WebAssembly / spec

WebAssembly specification, reference interpreter, and test suite.
https://webassembly.github.io/spec/
Other
3.11k stars 439 forks source link

wasm-js-api-2-fork-exception-handling redefines a bunch of wasm-js-api-2 terms #1611

Closed tabatkins closed 1 year ago

tabatkins commented 1 year ago

I'm not sure what the relative status of these two documents is, but they both claim to be the definition of a bunch of terms, and they're both picked up by WebRef so Bikeshedded specs get linking errors when they link into any of these terms. (I noticed this while building WebIDL, which references Memory/buffer.)

Which is definitive? Should we remove one of these from WebRef?

dtig commented 1 year ago

I'm not familiar with WebRef, my first guess would be that wasm-js-api-2-fork-exception-handling shouldn't be picked up by WebRef. More details/links would be helpful - is there a published Web spec that runs into linking errors? How does WebRef pick up specs?

tabatkins commented 1 year ago

Yes, as I said WebIDL was referencing terms from the spec and had an error as a result.

WebRef relies on the browser-specs project to determine what specs are "relevant for the web" and thus should be crawled for definitions. In this case, https://webassembly.github.io/exception-handling/js-api/ is the "fork" spec that's duplicating definitions from https://webassembly.github.io/spec/js-api/, which is presumably the "core" spec?

Should we ignore one of those?

dtig commented 1 year ago

IMO, we should ignore forks for Wasm specs, and only link to the published spec on the main branch. I've filed an issue on the browser-specs repo. Also +@Ms2ger as the author of the linked specs.

Ms2ger commented 1 year ago

Hmm, I guess the optimal situation would be that "outside" specs reference the base specs at https://webassembly.github.io/spec/js-api/ / https://webassembly.github.io/spec/web-api/ by default, but proposal-X/web-api should refer to proposal-X/js-api. Not sure if that's easy to do.

tabatkins commented 1 year ago

but proposal-X/web-api should refer to proposal-X/js-api. Not sure if that's easy to do.

It's not, at least currently.

tidoust commented 1 year ago

Which is definitive? Should we remove one of these from WebRef?

See comment in https://github.com/w3c/browser-specs/issues/891#issuecomment-1441931224. The spec is flagged with "seriesComposition": "fork" and "forkOf": "wasm-js-api-2" properties in browser-specs to make it clear that it is a fork. These properties are copied to the ed/index.json file in Webref as well, and could be used to filter the spec out (or only consider definitions that are new) when building the cross-referencing database

tabatkins commented 1 year ago

This ended up being best fixed on the Bikeshed side, so I'll close this now. Thanks!