-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Compilation breaks after update to 9.0.0-rc.13: Duplicate identifier 'ɵngcc0'
#35095
Comments
it's a bit hacky, but it should repro the issue well while keeping the shape of the integration test similar to the other integration tests.
I've tried to repro this in #35101 but so far I'm not having luck. |
Repro: https://github.com/cyrilletuzi/ngcc-cleanup To reproduce: git clone https://github.com/cyrilletuzi/ngcc-cleanup
cd ngcc-cleanup
npm run issue |
Thx for the repro, @cyrilletuzi. It really helped the to the bottom of it more quickly 💯 So, it turns out we are not invalidating our |
…ctories One particular scenario where this was causing problems was when the [BackupFileCleaner][1] restored a file (such as a `.d.ts` file) by [moving the backup file][2] to its original location, but the modified content was kept in the cache. [1]: https://github.com/angular/angular/blob/4d36b2f6e/packages/compiler-cli/ngcc/src/writing/cleaning/cleaning_strategies.ts#L54 [2]: https://github.com/angular/angular/blob/4d36b2f6e/packages/compiler-cli/ngcc/src/writing/cleaning/cleaning_strategies.ts#L61 Fixes angular#35095
…ctories One particular scenario where this was causing problems was when the [BackupFileCleaner][1] restored a file (such as a `.d.ts` file) by [moving the backup file][2] to its original location, but the modified content was kept in the cache. [1]: https://github.com/angular/angular/blob/4d36b2f6e/packages/compiler-cli/ngcc/src/writing/cleaning/cleaning_strategies.ts#L54 [2]: https://github.com/angular/angular/blob/4d36b2f6e/packages/compiler-cli/ngcc/src/writing/cleaning/cleaning_strategies.ts#L61 Fixes angular#35095
…ctories One particular scenario where this was causing problems was when the [BackupFileCleaner][1] restored a file (such as a `.d.ts` file) by [moving the backup file][2] to its original location, but the modified content was kept in the cache. [1]: https://github.com/angular/angular/blob/4d36b2f6e/packages/compiler-cli/ngcc/src/writing/cleaning/cleaning_strategies.ts#L54 [2]: https://github.com/angular/angular/blob/4d36b2f6e/packages/compiler-cli/ngcc/src/writing/cleaning/cleaning_strategies.ts#L61 Fixes angular#35095
…ctories (#35106) One particular scenario where this was causing problems was when the [BackupFileCleaner][1] restored a file (such as a `.d.ts` file) by [moving the backup file][2] to its original location, but the modified content was kept in the cache. [1]: https://github.com/angular/angular/blob/4d36b2f6e/packages/compiler-cli/ngcc/src/writing/cleaning/cleaning_strategies.ts#L54 [2]: https://github.com/angular/angular/blob/4d36b2f6e/packages/compiler-cli/ngcc/src/writing/cleaning/cleaning_strategies.ts#L61 Fixes #35095 PR Close #35106
…ctories (angular#35106) One particular scenario where this was causing problems was when the [BackupFileCleaner][1] restored a file (such as a `.d.ts` file) by [moving the backup file][2] to its original location, but the modified content was kept in the cache. [1]: https://github.com/angular/angular/blob/4d36b2f6e/packages/compiler-cli/ngcc/src/writing/cleaning/cleaning_strategies.ts#L54 [2]: https://github.com/angular/angular/blob/4d36b2f6e/packages/compiler-cli/ngcc/src/writing/cleaning/cleaning_strategies.ts#L61 Fixes angular#35095 PR Close angular#35106
…ctories (angular#35106) One particular scenario where this was causing problems was when the [BackupFileCleaner][1] restored a file (such as a `.d.ts` file) by [moving the backup file][2] to its original location, but the modified content was kept in the cache. [1]: https://github.com/angular/angular/blob/4d36b2f6e/packages/compiler-cli/ngcc/src/writing/cleaning/cleaning_strategies.ts#L54 [2]: https://github.com/angular/angular/blob/4d36b2f6e/packages/compiler-cli/ngcc/src/writing/cleaning/cleaning_strategies.ts#L61 Fixes angular#35095 PR Close angular#35106
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. |
🐞 bug report
Affected Package
I think the issue is in
@angular/compiler-cli
as it's aboutngcc
, but not sure.Is this a regression?
Yes, it was OK in previous RC (rc.12 and below).
Reproduction
npm install @angular/cli@next -g
ng new helloworld --skipGit
(git is disabled to avoid ng commands blocking because repo is not clean, otherwise you have to commit every change)cd helloworld
npm install @angular/{animations,common,compiler,core,forms,platform-browser,platform-browser-dynamic,router,compiler-cli,language-service}@9.0.0-rc.12
(rollback to rc.12, as CLI installed rc.13)ng add @angular/material@next
and addMatCardModule
inAppModule
importsnpm start
(to run the compilation with rc.12)ng update @angular/core --next
(will update to rc.13)npm start
🔥 Exception or Error
Compilation breaks with a lot of errors like this one (it's just an example):
🌍 Your Environment
Angular Version:
Anything else relevant?
Quite sure the issue comes from #35079. Before rc.13, when ng updating, next compilation would be blocked, asking to clean up
node_moddules
(#35082).With rc.13, compilation is not blocked anymore, Angular do a new
ngcc
compilation (Compiling @angular/core : es2015 as esm2015
), but then fails because of old artifacts. If you cleannode_modules
(npm ci
), then compilation works again.Also note that:
So I think #35079 does not clean up libraries packages.
The text was updated successfully, but these errors were encountered: