Fix #8509: warn and ignore --simpleresolution on .NET Core#19914
Open
T-Gro wants to merge 5 commits into
Open
Conversation
These tests assert the post-fix behaviour: on .NET Core, --simpleresolution must be ignored with a single FS3888 warning instead of producing FS0078 file-not-found errors for .NET Framework assemblies. They are expected to fail on main until the fix in CompilerOptions.fs lands. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
On .NET Core, --simpleresolution caused the resolver to search for .NET Framework assemblies (mscorlib, System.dll, System.Windows.Forms, ...) in non-existent directory layouts, producing a flood of misleading FS0078 errors. Gate the handler on FSharpEnvironment.isRunningOnCoreClr: when running on .NET Core, emit a single FS3888 warning and skip the useSimpleResolution assignment. Desktop fsc is unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add release-notes entry pointing to #8509 under 11.0.100.md. - Correct the Include path casing for the new simpleresolution test file in FSharp.Compiler.ComponentTests.fsproj (Fsc, not fsc) so the build resolves on case-sensitive filesystems (Linux CI). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
✅ No release notes required |
The fix on this branch (commits a101d85, 8594cb9, 80adf32, 61636cf) warned and ignored --simpleresolution on .NET Core. Two problems make the change unshippable: 1. Microsoft.FSharp.NetSdk.targets sets <SimpleResolution>true</> by default, so every `dotnet build` of an F# project passes --simpleresolution. The new warning is escalated to `FSC : error FS3888` by MSBuild's FscTask, which broke 22/22 CI jobs in Azure DevOps build 1455738, including the build of FSharp.Core itself. 2. The new `3888,optsSimpleresolutionNotSupportedOnCoreClr` entry was inserted in the unsorted `optsXxx` section of FSComp.txt; the next numbered entry (1046,...) is smaller than 3888, so `src/Compiler/FSCompCheck.fsx` fails with "Error codes not sorted in FSComp.txt, break(s) happened after [3888]". Reverts the production code, FSComp.txt + xlf additions, the new component tests, the test-project listing change and the release- notes entry. Issue #8509 remains open - any future fix must avoid warning on the SDK-driven coreclr code path. Co-authored-by: Copilot <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
On .NET Core,
--simpleresolutioncaused the resolver to search for .NET Framework assemblies (mscorlib, System.dll, etc.) in non-existent directory layouts, producing a flood of misleading FS0078 errors.Changes
Fixes
Fixes #8509