Drop hyphens when testing equality of kebab names - #2626
Conversation
This commit is an implementation of WebAssembly/component-model#704 for this repository where the main change is to drop the `-` character when comparing kebab-names. More rationale can be found in the upstream PR, and while there's expected to be minor amounts of test-related fallout this is not expected to break anything in practice.
| (component | ||
| (import "foo" (type $foo (sub resource))) | ||
| (import "[static]foo.bar-baz" (func)) | ||
| (import "[method]foo.barbaz" (func (param "self" (borrow $foo))))) |
There was a problem hiding this comment.
To maximize terribleness, you could also add a test where you import foo-bar, and then import [method]foo-bar.FO-ob-AR or something :) (In other words, something that will trigger the [method]foo.foo rule.)
You could also add a test that makes foo-bar and [constructor]FOOBAR conflict, but such a test would either require you to also import a resource type named FOOBAR (which would itself conflict as seen above), or it would imply that strong uniqueness is checked before the constructor name itself, which feels wrong to me but I don't think the order is specified today anyhow. (I'd just avoid a test for that at this stage.)
There was a problem hiding this comment.
Added the [method]... case, and yeah otherwise the order-of-validation makes it not possible right now to write a test for foo-bar and [constructor]FOOBAR
wasm-tools 1.259.0 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>## What's Changed * Refactor name resolution of components in the text format by @alexcrichton in bytecodealliance/wasm-tools#2621 * Import component spec tests as a submodule and run them. by @alexcrichton in bytecodealliance/wasm-tools#2623 * Fix name uniqueness with methods/interfaces by @alexcrichton in bytecodealliance/wasm-tools#2625 * Add compact import generation in wasm-smith by @chacailline in bytecodealliance/wasm-tools#2627 * Drop hyphens when testing equality of kebab names by @alexcrichton in bytecodealliance/wasm-tools#2626 * Enable wide-arithmetic by default in wasm-smith by @alexcrichton in bytecodealliance/wasm-tools#2628 * Validate the size of defined component types by @alexcrichton in bytecodealliance/wasm-tools#2624 * Update Wasmtime used in testing/fuzzing by @alexcrichton in bytecodealliance/wasm-tools#2629 * Fix text format outer aliases from recent refactor by @alexcrichton in bytecodealliance/wasm-tools#2631 * Remove `cancellable` immediate from component model intrinsics by @alexcrichton in bytecodealliance/wasm-tools#2630 * Start requiring "strict" indices in the text format by @alexcrichton in bytecodealliance/wasm-tools#2633 * Enable the `cm-implements` and `cm-map` features by default by @alexcrichton in bytecodealliance/wasm-tools#2634 * Clamp sizes of element segments in wasm-smith by @alexcrichton in bytecodealliance/wasm-tools#2632 * Fix wit-smith generating huge types by @alexcrichton in bytecodealliance/wasm-tools#2636 * Fix disallow_traps in wasm-smith with custom page sizes by @alexcrichton in bytecodealliance/wasm-tools#2635 * Resolve Cargo warnings on nightly by @alexcrichton in bytecodealliance/wasm-tools#2642 * Return an error instead of panicking on fixed-length-list size overflow by @zikk090 in bytecodealliance/wasm-tools#2643 * Try to improve performance of `deinline_import_export` by @alexcrichton in bytecodealliance/wasm-tools#2647 * Document a non-obvious method argument by @alexcrichton in bytecodealliance/wasm-tools#2645 * wasm-wave: Clean up syntax docs by @lann in bytecodealliance/wasm-tools#2644 * Update dependency major tracks by @alexcrichton in bytecodealliance/wasm-tools#2649 * Release wasm-tools 1.259.0 by @github-actions[bot] in bytecodealliance/wasm-tools#2650 ## New Contributors * @chacailline made their first contribution in bytecodealliance/wasm-tools#2627 * @zikk090 made their first contribution in bytecodealliance/wasm-tools#2643 **Full Changelog**: https://github.com/bytecodealliance/wasm-tools/compare/v1.258.0...v1.259.0</pre> <p>View the full release notes at <a href="https://github.com/bytecodealliance/wasm-tools/releases/tag/v1.259.0">https://github.com/bytecodealliance/wasm-tools/releases/tag/v1.259.0</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!20061
This commit is an implementation of WebAssembly/component-model#704 for this repository where the main change is to drop the
-character when comparing kebab-names. More rationale can be found in the upstream PR, and while there's expected to be minor amounts of test-related fallout this is not expected to break anything in practice.