BabylonJS / Babylon.js

Babylon.js is a powerful, beautiful, simple, and open game and rendering engine packed into a friendly JavaScript framework.
http://www.babylonjs.com
Apache License 2.0
22.75k stars 3.39k forks source link

Add optional parameters notation to JSDoc #15205

Closed arista-ms closed 2 weeks ago

arista-ms commented 2 weeks ago

Closure is failing with a message like:

`ERROR in abc.js:48234 (originally at @babylonjs-core@7.10.0-e5902e94f7a1ba005e89/dev/core/src/Misc/observable.ts:99) from closure-compiler: Inline JSDoc on default parameters must be marked as optional

Adding these comments to the JSDoc fixes that

bjsplat commented 2 weeks ago

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). To prevent this PR from going to the changelog marked it with the "skip changelog" label.

bjsplat commented 2 weeks ago

Snapshot stored with reference name: refs/pull/15205/merge

Test environment: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15205/merge/index.html

To test a playground add it to the URL, for example:

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15205/merge/index.html#WGZLGJ#4600

Links to test babylon tools with this snapshot:

https://playground.babylonjs.com/?snapshot=refs/pull/15205/merge https://sandbox.babylonjs.com/?snapshot=refs/pull/15205/merge https://gui.babylonjs.com/?snapshot=refs/pull/15205/merge https://nme.babylonjs.com/?snapshot=refs/pull/15205/merge

To test the snapshot in the playground with a playground ID add it after the snapshot query string:

https://playground.babylonjs.com/?snapshot=refs/pull/15205/merge#BCU1XR#0

bjsplat commented 2 weeks ago

WebGL2 visualization test reporter:

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15205/merge/testResults/webgl2playwright/index.html

bjsplat commented 2 weeks ago

Visualization tests for WebGPU (Experimental)

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15205/merge/testResults/webgpuplaywright/index.html

sebavan commented 2 weeks ago

@RaananW, it looks like we might have some weird specific requirements due to the use of closure compiler... I wonder whether there are some ways to automate it or @arista-ms if we should skip testing those typings in the build. Being based on JSDoc only is kind of scary considering the typings are ok ?

RaananW commented 2 weeks ago

we are tsdoc conform, checking against jsdoc would require a lot of changes on our side. I would rather understand what the requirements are before merging a lot of those changes. We might be able to auto-fix them, or make sure we are conform some other way. I just don't know the (build) system's requirements and properties :-)