Skip to content
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

Crash caused by newly released babel-transform@66.23.0 #5305

Closed
nickpalmer opened this issue Feb 14, 2017 · 14 comments
Closed

Crash caused by newly released babel-transform@66.23.0 #5305

nickpalmer opened this issue Feb 14, 2017 · 14 comments
Labels
i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@nickpalmer
Copy link

Version 6.23.0 of babel-transform causes babel-plugin-transform-es2015-destructuring to crash while compiling our app.

Pinning to babel-tranform@6.22.1 removes the crash.

If I console.log(this.hub) in babel-transform I see that this.hub is an empty object. This should be trivial to reproduce in any app that uses destructuring..

TypeError: /Users/nick/git/app/src/server/server.js: this.hub.addHelper is not a function
at Scope.toArray (/Users/nick/git/app/frontend/node_modules/babel-traverse/lib/scope/index.js:463:38)
at DestructuringTransformer.toArray (/Users/nick/git/app/frontend/node_modules/babel-plugin-transform-es2015-destructuring/lib/index.js:122:27)
at DestructuringTransformer.pushArrayPattern (/Users/nick/git/app/frontend/node_modules/babel-plugin-transform-es2015-destructuring/lib/index.js:277:26)
at DestructuringTransformer.push (/Users/nick/git/app/frontend/node_modules/babel-plugin-transform-es2015-destructuring/lib/index.js:110:14)
at DestructuringTransformer.init (/Users/nick/git/app/frontend/node_modules/babel-plugin-transform-es2015-destructuring/lib/index.js:317:12)
at PluginPass.VariableDeclaration (/Users/nick/git/app/frontend/node_modules/babel-plugin-transform-es2015-destructuring/lib/index.js:468:27)
at newFn (/Users/nick/git/app/frontend/node_modules/babel-traverse/lib/visitors.js:276:21)
at NodePath._call (/Users/nick/git/app/frontend/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/Users/nick/git/app/frontend/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/Users/nick/git/app/frontend/node_modules/babel-traverse/lib/path/context.js:105:12)

@babel-bot
Copy link
Collaborator

Hey @nickpalmer! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

@hzoo
Copy link
Member

hzoo commented Feb 14, 2017

Thanks for the report, we're looking into it now

@hzoo hzoo added the i: bug label Feb 14, 2017
@rsolomon
Copy link

Same issue with our build. If we can provide any additional information to help debug just let me know.

@hzoo
Copy link
Member

hzoo commented Feb 14, 2017

From #5050, need to investigate. We will just rollback immediately with a patch and then figure out the issue.

Yeah just need a code snippet + babelrc config to repro

@rsolomon
Copy link

babelrc:

{
  "presets": [
    "es2015",
    "es2016",
    "stage-0",
    "react"
  ],
  "plugins": [
    "add-module-exports",
    "react-hot-loader/babel",
    "transform-flow-strip-types",
    "transform-runtime",
    "transform-strict-mode"
  ]
}

No specific code triggers it-- it throws on every file when the unit tests are run.

@loganfsmyth
Copy link
Member

We're reverting now.

@nickpalmer
Copy link
Author

I think it is a mismatch with our older version of babel-core.

@loganfsmyth
Copy link
Member

I've reverted the PR and published 6.23.1 of babel-core and babel-traverse, please install your deps and things should be back.

@hzoo
Copy link
Member

hzoo commented Feb 14, 2017

Thanks everyone for the reports! Like mentioned ^, please update core/traverse

We'll setup better infrastructure to prevent this kind of incompatible change in the future (our issue due to being a monorepo)

@yongxu
Copy link
Contributor

yongxu commented Feb 14, 2017

Sorry for this breaking PR. It passed the test when I finished it, but its been a little while. Will look into it now, really sorry for breaking the repo..

@existentialism
Copy link
Member

@yongxu you didn't break anything! we just missed categorizing it as a breaking change, so we'll revisit landing it asap.

@hzoo
Copy link
Member

hzoo commented Feb 15, 2017

Closing now since issue has been fixed (wanted to leave it up for a while so no one needed to make a duplicate issue)

@hzoo hzoo closed this as completed Feb 15, 2017
@yongxu
Copy link
Contributor

yongxu commented Feb 16, 2017

thank you for letting me know @existentialism! The file was passed to PluginPass and something else changed it(probably assumed it was a changeable state) it somewhere else. I don't think the problem could possibly be my PR. I took a look yesterday but wasn't confident to give the conclusion. It's great to have someone confirm it!

@yongxu
Copy link
Contributor

yongxu commented Feb 20, 2017

@loganfsmyth @hzoo Is there any plan for merge this back or is there any update I should work on? Please let me know if there is anything I should do :)

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label May 5, 2018
@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

7 participants