-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUGFIX] if our ancestor import declaration is removed short-circuit … #79
Conversation
@@ -58,8 +58,13 @@ module.exports = class Macros { | |||
if (!this.debugHelpers.module) { | |||
if (this.localDebugBindings.length > 0) { | |||
let importPath = this.localDebugBindings[0].findParent(p => p.isImportDeclaration()); | |||
if (importPath === null) { | |||
// import declaration in question seems to have already been removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this in the wild, my guess is two babel plugins are both mutating the graph. Resulting in this outcome...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be related to emberjs/ember-cli-babel#286 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, those two babel plugins both operate on separate import paths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add a test?
789ab55
to
a8a69d0
Compare
@rwjblue ya, trying to come up with one that is representative. Although I'm not 100% sure my above idea is the root cause. |
a8a69d0
to
3358c58
Compare
…gracefully