Closed keithw closed 1 year ago
In 2018 (https://github.com/WebAssembly/spec/pull/720 and https://github.com/WebAssembly/spec/pull/926), the spec renamed some keywords before WebAssembly was standardized (get_local -> local.get, anyfunc -> funcref, etc.).
get_local
local.get
anyfunc
funcref
WABT dropped support for the old names in 2021 (https://github.com/WebAssembly/wabt/pull/1792), MDN revised its documentation in 2022 (https://github.com/mdn/interactive-examples/pull/2298), and wasm-tools dropped support last month (https://github.com/bytecodealliance/wasm-tools/pull/1184). However, users do get confused when they find a tutorial that uses the old syntax and the code works in more-tolerant implementations but is rejected by other conforming consumers. (E.g. https://github.com/WebAssembly/wabt/issues/1802, https://github.com/WebAssembly/wabt/issues/1820, https://github.com/WebAssembly/wabt/issues/1883, https://github.com/WebAssembly/wabt/issues/2010, ...)
Now that it's been five years and tutorials using the old syntax are increasingly rare, this PR would check that the old keywords are now considered malformed.
LGTM, except nit: can we rename the test to obsolete-keywords?
obsolete-keywords
Sure, pushed.
In 2018 (https://github.com/WebAssembly/spec/pull/720 and https://github.com/WebAssembly/spec/pull/926), the spec renamed some keywords before WebAssembly was standardized (
get_local
->local.get
,anyfunc
->funcref
, etc.).WABT dropped support for the old names in 2021 (https://github.com/WebAssembly/wabt/pull/1792), MDN revised its documentation in 2022 (https://github.com/mdn/interactive-examples/pull/2298), and wasm-tools dropped support last month (https://github.com/bytecodealliance/wasm-tools/pull/1184). However, users do get confused when they find a tutorial that uses the old syntax and the code works in more-tolerant implementations but is rejected by other conforming consumers. (E.g. https://github.com/WebAssembly/wabt/issues/1802, https://github.com/WebAssembly/wabt/issues/1820, https://github.com/WebAssembly/wabt/issues/1883, https://github.com/WebAssembly/wabt/issues/2010, ...)
Now that it's been five years and tutorials using the old syntax are increasingly rare, this PR would check that the old keywords are now considered malformed.