Use matching local FSharp.Core for regression builds#20072
Draft
majocha wants to merge 9 commits into
Draft
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Summary
This PR updates the local-compiler regression shim so it uses the locally built FSharp.Core in a way that matches the consuming project's target framework, instead of forcing a single global core choice.
What changed
UseLocalCompiler.Directory.Build.propsso the shim selects a matching local FSharp.Core asset based on the project target framework.netstandard < 2.1), the shim uses the localnetstandard2.0FSharp.Core build.net8.0/net10.0), the shim uses the localnetstandard2.1FSharp.Core build.FSharp.Corereferences from the build graph and replaces them with the matching local assembly during assembly resolution, avoiding version conflicts with package-basedFSharp.Corereferences.Why
The regression-test harness needs to test the locally built FSharp.Core, but it must do so in a way that is compatible with the project being built. The previous behavior could force the wrong FSharp.Core flavor for some projects and lead to build failures, assembly-version conflicts, or duplicate-reference issues.
Validation
I validated the new shim locally with two smoke builds:
and a temporary repro project that explicitly references
FSharp.Core10.0.100 to mirror the CI failure mode:Both completed successfully without the FSharp.Core conflict or duplicate-reference issue seen in CI.