Minor improvements and fixes#2900
Merged
xperiandri merged 3 commits intoJul 13, 2026
Merged
Conversation
…codes Parallel builds no longer hang on Ctrl+C, script cache invalidates when paket.lock changes, and crashes/failures can't slip through as green. - Target: release workers parked in the wait list on cancellation (Cancel message + drain on IsCancellationRequested) so a cancelled build exits instead of deadlocking - FakeRuntime: fold the resolved dependency set into the script cache key so a paket.lock change stops reusing a DLL compiled against old packages - Process: make ProcessList get-or-create atomic so concurrently started processes aren't lost from Ctrl+C cleanup - VSTest: negative exit codes (crashed test host) fail the build even under DontFailBuild - Git.Commit: escape commit messages via Args.toWindowsCommandLine instead of naive quoting - Fake.netcore: honour Environment.ExitCode set by scripts in both shipped runners (was gated behind a define only one of them had)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses several sources of “green-but-broken” builds by improving cancellation behavior, cache invalidation correctness, and process/exit-code handling in FAKE’s runners and tooling.
Changes:
- Prevent parallel target execution from deadlocking on cancellation by draining waiting workers when
CancellationTokenis triggered. - Make script compilation caching sensitive to resolved Paket dependencies (not just script text/FSI args) to avoid reusing stale compiled assemblies.
- Tighten failure signaling across runners/tools: treat crashed VSTest hosts as failures, preserve script-set
Environment.ExitCode, and harden git commit argument escaping.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/app/Fake.Tools.Git/Commit.fs | Builds git commit args via Args.toWindowsCommandLine to properly escape commit messages. |
| src/app/Fake.Runtime/FakeRuntime.fs | Incorporates dependency/lock-state into the script cache key to invalidate stale cached DLLs. |
| src/app/Fake.netcore/Program.fs | Ensures Environment.ExitCode set by scripts is honored consistently across runners. |
| src/app/Fake.DotNet.Testing.VSTest/VSTest.fs | Treats negative (crash) exit codes as build failures even under DontFailBuild. |
| src/app/Fake.Core.Target/Target.fs | Adds cancellation signaling to the parallel scheduler to drain parked workers and avoid hangs. |
| src/app/Fake.Core.Process/Process.fs | Makes started-process tracking get-or-create atomic to avoid losing PIDs under parallel starts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The Copilot-test commit referenced FakeRuntime.computeDependencyAwareHash, which was never committed, so the unit tests could not compile. Restore the pure helper by extracting the dependency-aware cache-key logic out of the paketCachingProvider closure (behaviour-identical), and apply fantomas formatting to the new Target cancellation test so CheckFormatting passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
xperiandri
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix silent build failures: cancellation deadlock, stale caches... Parallel builds no longer hang on Ctrl+C, script cache invalidates when paket.lock changes, and crashes/failures can't slip through as green.