Asyncify: warn/error when functions match both ADD and REMOVE
curiousdannii opened this issue · comments
Follow on to emscripten-core/emscripten#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.)