WebAssembly / WebAssembly/binaryen
Asyncify: warn/error when functions match both ADD and REMOVE
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
Follow on to https://github.com/emscripten-core/emscripten/issues/13150
If a function is explicitly listed in both the add-list and remove-list, that should be an error.
But if there are wildcards, then it's less obvious what to do... For safety reasons, anything matching an ADD should still be added. Except maybe ADD* + REMOVE?
Matching a wildcard on both seems like a clearly ambiguous situation, and so should warn.
If we assume that most people only have issues from Add* + Remove*, then we'd probably want people to resolve the ambiguity by explicitly listing functions. So an explicit Add should just overrule a Remove*, that seems safe, and not worthy of a warning.
Are we okay with making an explicit Remove overrule an Add*? That's the riskiest combination. Instead of ignoring the Add*, we could still warn for such combinations, suggesting people change their Add wildcards to be more specific so they stop matching the Removed function.
And imports should be treated like the add-list, I think.
| Add | Add * | Imports | |
|---|---|---|---|
| Remove | Error | ???? | Error |
| Remove * | Ignore | Warn | Ignore |
(This isn't a high priority request. I've used remove* before, but never add*. And I haven't seen anyone else report issues due to the lack of warnings.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Asyncify's matching logic for the add-list, remove-list, wildcards, and imports. Use the decision table in the issue to resolve explicit and wildcard overlaps, then add warnings or errors and tests that cover each listed combination.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100