Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(ngcc): re-enable killing ngcc (and CLI) via Ctrl-C #35861

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

Closed

Conversation

petebacondarwin
Copy link
Contributor

@petebacondarwin petebacondarwin commented Mar 4, 2020

Fixes #35761

For the moment I have left the old implementation in there too. We should probably remove it either as part of this PR or soonish, unless we decide that we want to make it configurable and allow people the different options.

@petebacondarwin petebacondarwin added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release comp: ngcc labels Mar 4, 2020
@ngbot ngbot bot modified the milestone: needsTriage Mar 4, 2020
@pullapprove pullapprove bot requested a review from JoostK March 4, 2020 21:52
@petebacondarwin petebacondarwin force-pushed the ngcc-better-lockfile branch 3 times, most recently from 8ae0fad to e8936a3 Compare March 4, 2020 22:51
The previous implementation mixed up the management
of locking a piece of code (both sync and async) with the
management of writing and removing the lockFile that is
used as the flag for which process has locked the code.

This change splits these two concepts up. Apart from
avoiding the awkward base class it allows the `LockFile`
implementation to be replaced cleanly.
Copy link
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

The CI failures seem legit 🤔

@petebacondarwin petebacondarwin added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 5, 2020
@ngbot
Copy link

ngbot bot commented Mar 5, 2020

I see that you just added the PR action: merge label, but the following checks are still failing:
    failure status "pullapprove" is failing
    pending 4 pending code reviews

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@gkalpak gkalpak added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: merge The PR is ready for merge by the caretaker labels Mar 5, 2020
Copy link
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✨

@petebacondarwin petebacondarwin added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Mar 5, 2020
@matsko
Copy link
Contributor

matsko commented Mar 5, 2020

@petebacondarwin please rebase and make this work with the patch branch. Maybe it's easier just to have two different PRs because there are so many commits?

@matsko matsko added target: major This PR is targeted for the next major release and removed target: patch This PR is targeted for the next patch release labels Mar 5, 2020
@matsko matsko closed this in bdaab41 Mar 5, 2020
matsko pushed a commit that referenced this pull request Mar 5, 2020
The previous implementation mixed up the management
of locking a piece of code (both sync and async) with the
management of writing and removing the lockFile that is
used as the flag for which process has locked the code.

This change splits these two concepts up. Apart from
avoiding the awkward base class it allows the `LockFile`
implementation to be replaced cleanly.

PR Close #35861
matsko pushed a commit that referenced this pull request Mar 5, 2020
matsko pushed a commit that referenced this pull request Mar 5, 2020
…35861)

This version of `LockFile` creates an "unlocker" child-process that monitors
the main ngcc process and deletes the lock file if it exits unexpectedly.

This resolves the issue where the main process could not be killed by pressing
Ctrl-C at the terminal.

Fixes #35761

PR Close #35861
@petebacondarwin
Copy link
Contributor Author

Created a patch PR @matsko: #35934

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI no longer supports cancellation (Ctrl-C)
5 participants