-
Notifications
You must be signed in to change notification settings - Fork 35
Description
In the hypothetical merger scenario of something using with import-attributes, I think we’re arbitrarily picking one of the nodes to merge the other into (presumably the earliest node becomes the parent).
Docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import/with
I’m not sure what we should do if import attributes are in play:
- Prevent the merge if they use attributes
- Abort the merge if they don’t have identical attributes. (Is attribute order significant? Recent JS ecosystem stuff has made key ordering in a dictionary significant sometimes)
- Abort the merge if they have incompatible attributes.
- Merge the attributes
I only know how to implement 1 & 2. No idea how to implement 3 & 4.
I’m kind of of the mindset of either doing nothing until somebody reports an issue (I have no idea who actually uses this feature, and how), or implementing one of 1 or 2.
Further question: Is it legal to merge something without attributes into an expression that has some attributes? — If that’s not legal, then we likely have a bug that will require more significant work in our algorithm.
This ticket is a placeholder ticket: if you have a use-case for it, please speak up, and help answer correctness questions for us! Ideally with an example of correct behavior!