You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is then mixed into the main config. So the String value in the main config will be replaced by the above code block during the evaluation of this block.
The issue here is that mix completely overwrites the String entry in the config, which I suspect is because it does not deep copy it.
Due to the way mix was rewritten in this commit, sliceProps ends up only creating a String object with whatever the incoming mixer has, instead of only selectively overwriting the individual fields of the objects with new versions.
I'm lodging the bug here as opposed to in CSSO because I feel like the expectation with mix is that it deep copies, and so the call from the CSSO side is correct.
This currently is not causing an issue with CSSO since they specify to use version ~2.2.0 of CSSTree, which is before this mix refactor occurred. Once they update their dependency the issue will become apparent from that side.
The text was updated successfully, but these errors were encountered:
I think I've found an issue with mixing no longer deep copying values after a recent update.
My case:
I use CSSO in my project, which in turn uses CSSTree.
CSSO calls (at least in one place) into CSSTree here, where it calls fork with an object with a couple of values. The key one is:
This is then mixed into the main config. So the
String
value in the main config will be replaced by the above code block during the evaluation of this block.The issue here is that mix completely overwrites the String entry in the config, which I suspect is because it does not deep copy it.
For instance, if the config is:
and we attempt to mix that with the above String object from CSSO, we end up with:
Due to the way mix was rewritten in this commit, sliceProps ends up only creating a
String
object with whatever the incoming mixer has, instead of only selectively overwriting the individual fields of the objects with new versions.I'm lodging the bug here as opposed to in CSSO because I feel like the expectation with mix is that it deep copies, and so the call from the CSSO side is correct.
This currently is not causing an issue with CSSO since they specify to use version ~2.2.0 of CSSTree, which is before this mix refactor occurred. Once they update their dependency the issue will become apparent from that side.
The text was updated successfully, but these errors were encountered: