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
When using the power-assert preset (see power-assert-js/babel-preset-power-assert#4, not when used individually as plugins), Istanbul and power-assert don't like eachother very much.
More information over there; I suspect it's a problem with load-order within babel, and one of the two systems stomping on eachother. Only posting here as a cross-reference.
The text was updated successfully, but these errors were encountered:
@ELLIOTTCABLE we've seen similar issues with babel-plugin-lodash and babel-plugin-rewire. In the case of babel-plugin-rewire we were able to write some defensive code in istanbul-lib-instrument to step around the error (the include order of the two plugins did however have an effect).
Where possible, I'd like to continue adding defensive logic in the instrumenter, to diffuse these plugin conflicts; at the same time, it might be worth also opening a conversation on babel/babel to discuss how these problems might better be avoided -- seems like theme at this point.
Good to hear that defensiveness and compatibility are project goals! Power to you.
Yeah, I would definitely consider this an upstream problem (ordering is always going to matter when applying transformations to source-code, pretending it doesn't is a pipe-dream; and if order matters, robust tools for controlling ordering are seriously necessary. (This is of especial interest to me as a programming-language theorist and messer-around with S2S transforms! 🤣)) Personally, I like the traditional solution — ‘niceness’ or ‘priority,’ with projects being able to document “this needs to happen before some things” (nice: 0), or “this needs to happen after most other transforms” (nice: 20), etc; although something overengineered involving graphs and explicit dependency-graph declaration is possible as well ¯\_(ツ)_/¯.
That said, it's not my battle to dive into with Sebastian et al. If you think it's worth bringing up, drop a mention of this thread, and I'm happy to offer my arguments, though.
Meanwhile, feel free to consider this Issue low-priorty — it's an easy fix, even if it's underdocumented, to just swap the two. (=
When using the power-assert preset (see power-assert-js/babel-preset-power-assert#4, not when used individually as plugins), Istanbul and power-assert don't like eachother very much.
More information over there; I suspect it's a problem with load-order within babel, and one of the two systems stomping on eachother. Only posting here as a cross-reference.
The text was updated successfully, but these errors were encountered: