Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support for build cancellation #42
Right now, cancellation is only supported when using the C API.
I opted to not refactor the ninja stuff for now, which has its own implementation of cancellation. I think that can be done in a separate PR.
changed the title from
WIP: Support for build cancellation
Support for build cancellation
Dec 6, 2016
This looks like a fine start, but there are a number of race conditions (and a possible use after free) I noted inline.
For development purposes, can you split this into an infrastructure change which adds the cancellation support to LaneBasedExecutionQueue, with a unit test (since that is the most subtle area, and worth ensuring we have coverage of)?
It is important that we have coverage of things like the SIGINT -> SIGKILL escalation, because that has historically caused problems in practice for build systems.
We can test this by just shelling out to things like
sleep or a shell script (or command line tool) which ignores SIGINT.
It passed CI, then the branch was tweaked in response to review feedback. I assume that must have broken something.
By "gated commits" I mean that GitHub won't let you merge a PR without CI passing on the current version of the PR. You'd also have to be in the habit of always going through PRs, but that's not hard to get used to
Jordan is right, I did make some final changes which I thought were trivial, but the test in question is failing reliably on Linux now.
I also agree that enforcing CI to pass for PRs would be a good idea, especially if the other projects are already doing that.
I'm unsure how to fix the test, I think it runs into a similar problem as the existing Ninja one, which is deactivated for Linux (see https://github.com/apple/swift-llbuild/blob/master/tests/Ninja/Build/signal-handling.ninja#L16-L17).
Additionally, the "sigkill-escalation" one hangs when run through