Repository navigation
Tests: compile legacy-framework fixtures against net48 reference assemblies from NuGet (fixes CI on Linux) - #9
Merged
Conversation
…mblies from NuGet parseAndCheckLegacyFramework resolved .NET Framework references with assumeDotNetFramework = true, which finds them in Program Files: only Windows has them. On the Linux CI runner the script got no usable mscorlib (`string` did not resolve), so since requireTypechecks went in, "check-then-add stays where the framework has no Dictionary TryAdd" fails there; before, it passed without testing anything. The test project now takes Microsoft.NETFramework.ReferenceAssemblies.net48 (assets excluded, only its files are read) and passes its folder to the tests as assembly metadata; the helper compiles against mscorlib, System, System.Core, System.Numerics, System.Xml, System.Data, the netstandard and System.Runtime facades and FSharp.Core. The Windows-only guard on the FR0106/FR0166/FR0167 legacy test goes, since it now runs everywhere. Claude-Session: https://claude.ai/code/session_019V58BHhd4xcqmxoYHpKdTk
Owner
|
Ok this is clearly better solution, thank! |
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.
CI on
mainhas been red sinceaee4bc72(unit-tests updates), always on the same test:parseAndCheckLegacyFrameworkresolves its references withassumeDotNetFramework = true, which finds the .NET Framework reference assemblies in Program Files, and only Windows has those. On the Linux runner the script got no usable mscorlib, so the fixture couldn't typecheck. BeforerequireTypecheckswent in, the test passed there without testing anything; the new check is doing its job. It passes on Windows, which is why it doesn't show locally.This PR gives the legacy compilation the same references on every OS:
Microsoft.NETFramework.ReferenceAssemblies.net48with its assets excluded, and passes the package folder to the tests as anAssemblyMetadataattribute.parseAndCheckLegacyFrameworkAllowingErrorskeeps the script options but swaps the-r:references for net48'smscorlib,System,System.Core,System.Numerics,System.Xml,System.Data, thenetstandardandSystem.Runtimefacades, and FSharp.Core.OperatingSystem.IsWindows()guard on the FR0106/FR0166/FR0167 legacy test comes out, since that test can now run everywhere.Verified on Linux: CI on this branch in my fork passed (build, 2,991 + 11 tests, vsix, vscode-ext). The failing test and the previously Windows-only one both run and pass there. The two legacy tests also pass on Windows, and
fantomas --checkis clean.https://claude.ai/code/session_019V58BHhd4xcqmxoYHpKdTk