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
build: add missing @babel/generator bazel dep to fix //packages/localize/src/tools/test:test #34974
Conversation
…ize/src/tools/test:test It's not clear how this ever worked (npm hoisting is a suspect though), but this dep is required because one of the tests imports @babel/generator in the ts sources. The lack of this dep is breaking builds on the master branch. More discussion about this issue on Slack: https://angular-team.slack.com/archives/C07DT5M6V/p1579934766007500
You can preview af97ced at https://pr34974-af97ced.ngbuilds.io/. |
@@ -11,6 +11,7 @@ ts_library( | |||
"//packages/compiler", | |||
"//packages/localize", | |||
"//packages/localize/src/tools", | |||
"@npm//@babel/generator", |
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.
Do we need to have these packages in package.json
or is BUILD.bazel
enough?
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 think you are right. I added it as well as the @types/babel__generator package in a separate commit.
There are quite a few @babel/generators in node_modules on master.
The test that is causing trouble transitively depends on
But if it wasn't hoisted due to package.json changes that could break the test. I don't think this PR is sufficient to fix the problem in all cases as it is possible that there will be no The file that uses
|
@IgorMinar Threw up a quick #34980 with my suggestion |
Previously we just happened to be able to use it because of npm hoisting.
…rc/tools/test:test_lib Previously we relied on this package being hoisted and available, which is error prone and it would be just a matter of time before the build would break due rehoisting of deps upon future npm package.json changes.
merge-assistance: global approval |
@gregmagolan George noticed the same thing, and I addressed it in follow up commits. |
You can preview a8565a7 at https://pr34974-a8565a7.ngbuilds.io/. |
the test failures most likely result from the babel updates in the previous commit. it does look like we lost the file path from the error message, which is something that we should follow up no in a separate change.
It seems that we missed adding it before and listed all the localize fixes under 'ivy'.
You can preview 6020c70 at https://pr34974-6020c70.ngbuilds.io/. |
@@ -140,9 +140,9 @@ describe('makeEs5Plugin', () => { | |||
expect(diagnostics.hasErrors).toBe(true); | |||
expect(diagnostics.messages[0]).toEqual({ | |||
type: 'error', | |||
message: '/app/dist/test.js: `$localize` called without any arguments.\n' + |
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.
@petebacondarwin this is unexpected and likely due to the @babel version update in 0a5a944 can you please look into why the path disappeared and fix it in a follow up PR if possible? I'd like to get this PR landed so that it doesn't block other PRs.
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.
Not sure, yet, why the file path has disappeared. But the other changes to the error messages (i.e. the extra ^^^^
etc) are due to this commit in Babel: babel/babel@f1bc6c4
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.
Ahah! The filename was removed in this commit: babel/babel@dcf7d89
…ize/src/tools/test:test (#34974) It's not clear how this ever worked (npm hoisting is a suspect though), but this dep is required because one of the tests imports @babel/generator in the ts sources. The lack of this dep is breaking builds on the master branch. More discussion about this issue on Slack: https://angular-team.slack.com/archives/C07DT5M6V/p1579934766007500 PR Close #34974
Previously we just happened to be able to use it because of npm hoisting. PR Close #34974
the test failures most likely result from the babel updates in the previous commit. it does look like we lost the file path from the error message, which is something that we should follow up no in a separate change. PR Close #34974
It seems that we missed adding it before and listed all the localize fixes under 'ivy'. PR Close #34974
Previously we just happened to be able to use it because of npm hoisting. PR Close #34974
the test failures most likely result from the babel updates in the previous commit. it does look like we lost the file path from the error message, which is something that we should follow up no in a separate change. PR Close #34974
It seems that we missed adding it before and listed all the localize fixes under 'ivy'. PR Close #34974
In angular#34974 the top level dependency on `@babel/core` was bumped to 7.8.3. This commit ensures that the package.json that gets included in the `@angular/localize` distributable is at the same version.
…ize/src/tools/test:test (angular#34974) It's not clear how this ever worked (npm hoisting is a suspect though), but this dep is required because one of the tests imports @babel/generator in the ts sources. The lack of this dep is breaking builds on the master branch. More discussion about this issue on Slack: https://angular-team.slack.com/archives/C07DT5M6V/p1579934766007500 PR Close angular#34974
…r#34974) Previously we just happened to be able to use it because of npm hoisting. PR Close angular#34974
…rc/tools/test:test_lib (angular#34974) Previously we relied on this package being hoisted and available, which is error prone and it would be just a matter of time before the build would break due rehoisting of deps upon future npm package.json changes. PR Close angular#34974
the test failures most likely result from the babel updates in the previous commit. it does look like we lost the file path from the error message, which is something that we should follow up no in a separate change. PR Close angular#34974
It seems that we missed adding it before and listed all the localize fixes under 'ivy'. PR Close angular#34974
In angular#34974 the top level dependency on `@babel/core` was bumped to 7.8.3. This commit ensures that the package.json that gets included in the `@angular/localize` distributable is at the same version. PR Close angular#35008
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
It's not clear how this ever worked (npm hoisting is a suspect though), but this dep is required because
one of the tests imports @babel/generator in the ts sources.
The lack of this dep is breaking builds on the master branch.
More discussion about this issue on Slack: https://angular-team.slack.com/archives/C07DT5M6V/p1579934766007500