-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Over-zealous CompilerServices.Extension removal hint in 2023.3.1 #587
Comments
@bartelink Interesting, thank you for writing about it! We've actually also had an issue in the detection of the language version recently (which is now fixed in the upcoming update), and we could suggest simplifying it this way when F# 8 compiler wasn't available locally either. The problematic part with your case is we always use the current compiler/toolset info to determine the available version, and not what is allowed by the global.json besides the local ones. I'll talk to the team about it, thanks! |
@bartelink Is there a reason for you to have that much difference between your local environment and CI? While I agree that using global.json works great for allowing wider range of SDKs to be used by other contributors, there may still be various small and unexpected issues (breaking changes in the compilers, potentially incompatible compiler plugins (i.e. F# type providers, Roslyn analyzers) that could break build for someone else on another SDK. Also, the analyzers used during the local build (Roslyn ones for C#, or the upcoming F# ones planned for F# 9+) currently know nothing about the global.json, so they may suggest making changes that wouldn't be compatible with the language version that could be implied by global.json, just like we do in our analysis. Currently we've decided that we would like to stick with checking the local environment only, because maintaining a table of SDKs, compilers, and their supported language versions and breaking changes would require quite some effort, and it seems that specifying the target version via |
That makes sense; I can put a LangVersion in Directory.build.props to match the implication of the version in global.json - it had just not occurred to me. (reason for discrepancy is that prod images have V6 which is LTM, but brew install has 8 and I can't be bothered to figure out how to dual install and have everything everywhere see them all. TBH I have a local diff I keep stashing/unstashing to flip between latestRelease and latestMajor, which is a royal pain!) |
My global.json refs a v6 SDK with rollforward as
latestMajor
(and I have V8 SDK installed)While this hint is correct if you are using a V8 compiler (implemented in dotnet/fsharp#13839), it's very wrong if your CI only supplies a V6 one (it'll error in F# or C# consuming code as the compiler does not add the implicitly required one at the
type
level)Ideally, that hint should be subject to a guarantee of V7/V8 compiler being present
The text was updated successfully, but these errors were encountered: