[x3d-public] Validating X3D ECMAScript SAI code.
John Carlson
yottzumm at gmail.com
Wed Dec 11 09:51:25 PST 2024
It would be helpful to create an ECMAScript (ES) validation engine/linter
for X3D (Extensible 3D) ES Scene Access Interface (SAI) code, instead of
people flipping between X3D browsers, hoping that one of them will produce
a bug report. Segmentation faults aren’t nice either—unless you’ve got a
C/C++ debugger handy. A typical ES developer may not know how to run that
kind of debugger.
My idea would be to take a ES engine, probably Node.js, Deno, Bun, GraalJS,
or a linter and add features specific to X3D ES SAI to ensure that our ES
code doesn’t break or produce a segmentation fault when we load a scene,
and users don’t have to test every browser for compatibility (WORA goal).
Also incompatibilities between SAI implementations should be noted.
I would like to collect “gotchas” people have discovered while developing
ES SAI code.
Recent errors for me include:
1. Global variables throw errors. Global variables required to pass
information between function calls (see 3).
2. Const and let not accepted.
3. function signature not implemented (deleteRoute), or differences in
number of parameters. Passing route between function calls requires global
(see 1).
4. console not implemented
5. Warn on usage of …array for long arrays.
6. ES6 import not accepted.
7. Differences between internal and external SAI.
8. Using native types vs X3D types.
9. Linters complain about X3D stuff
10. “use strict”; not acceptable in some X3D browsers.
More?
If someone already knows of something like this, please share.
Perhaps we only need to produce a linter, and not a full on parser.
Perhaps we could consult with developers of the ES linters and ES parsers
for the best way to proceed.
I feel that NIST may be the best place to implement such a checker, at
least in USA, but they may be overloaded.
It really is a shot of dopamine when you figure out a bug that is
preventing you from proceeding!
Perhaps there should be an “X3D way” for developing in ES.
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20241211/eeb86014/attachment.html>
More information about the x3d-public
mailing list