Allow specifying custom NGCC lockfile location (cannot build in parallel with Ivy)
See original GitHub issueπ feature request
Relevant Package
This feature request is for @angular/compiler-cliDescription
I am running multiple webpack build pipelines simultaneously in CI. It does work without Ivy, but with Ivy (Angular 9 rc 11) it fails with:
(If you are sure no ngcc process is running then you should delete the lockfile at /drone/src/github.com/Rush/angular-app/node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__.)
Describe the solution youβd like
This line should allow overwriting the lock file location: https://github.com/angular/angular/blob/d15cf60c4969c4da081d0efdbc818abfd3fe43eb/packages/compiler-cli/ngcc/src/execution/lock_file.ts#L20 Perhaps like so:
lockFilePath = process.env.ANGULAR_NGCC_LOCK_FILE_PATH ||
this.fs.resolve(require.resolve('@angular/compiler-cli/ngcc'), '../__ngcc_lock_file__');
I think this is safe cause all simultaneous compiles are happening in Webpack so theyβre not conflicting with each other. @petebacondarwin @AndrewKushnir
Not having this would cause my builds running 10x more slowly due to a lot of parallelism.
Describe alternatives youβve considered
Disabling the lock file with a config option.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Nx build - Another process, with id xxx, is currently running ngcc
This is probably caused by command nx affected:build --all --parallel --configuration=production . That runs all builds in parallel, whereΒ ...
Read more >The Angular linker (goodbye ngcc!) - Ninja Squad
The first time you install a dependency, ngcc has to run to transform the library to an Ivy version. Let's take a small...
Read more >Craft a complete GitLab pipeline for Angular. Part 1
In this first part, you'll learn GitLab pipelines basics and craft an Angular pipeline including build, tests, coverage and lint in a docker...
Read more >Aug 19 2019 12:42 UTC - angular/angular - Gitter
So, let's say I want to compile with Ivy. However one of my dependencies ( date-fns ) is incompatible for NGCC, as it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Working on a fix (b)
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.