question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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-cli

Description

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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
petebacondarwincommented, Jan 30, 2020

Working on a fix (b)

0reactions
angular-automatic-lock-bot[bot]commented, Mar 26, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >
@angular/cli | Yarn - Package Manager
Fast, reliable, and secure dependency management.
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found