Skip to content
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

Update FSharp.Compiler.Service to version 34.0.1 #112

Merged
merged 8 commits into from
Feb 9, 2020

Conversation

baronfel
Copy link
Contributor

@baronfel baronfel commented Feb 8, 2020

This brings along some perf improvements, as well as a slew of syntax features and preview features that have been merged in the last few months.

I added support for the LangVersion option to the MirrorSharpFsharpOptions as well, which enables people to use any of the features gated by specific language version/preview support: feature list

@baronfel
Copy link
Contributor Author

baronfel commented Feb 8, 2020

I'm not sure how support for LangVersion would flow through sharplab specifically, though.

Another thing I noticed: it looks like in sharplab the F# support is using .Net Framework instead of .Net Core assemblies? If that's right I can help fix that.

@baronfel baronfel changed the title Update FSharp.Compiler.Server to version 34.0.1 Update FSharp.Compiler.Service to version 34.0.1 Feb 8, 2020
@ashmind
Copy link
Owner

ashmind commented Feb 9, 2020

Thanks! Looks good -- I'll take a look soon.
I just caused some conflicts by updating master, but I should be able to resolve them.

For SharpLab:

  1. LangVersion is normally set to the current maximum value -- I can set that to 9999
  2. SharpLab has both .NET Core and .NET Framework sites depending on what you select in dropdown -- each one should use corresponding platform for F#?

@baronfel
Copy link
Contributor Author

baronfel commented Feb 9, 2020

LangVersion should probably just be 'preview' for us, then. This includes all present and future language enhancements. Re: .Net Core/.Net Framework: there's a --targetprofile command line setting that should vary based on that choice. It should be --targetprofile:netcore for .net core, and --targetprofile:mscorlib for .net framework. I'll get the correct value and update here.

# Conflicts:
#	Tests.NetCore/Tests.NetCore.csproj
#	Tests.Shared/FSharpProjectOptionsExtensionsTests.cs
@ashmind
Copy link
Owner

ashmind commented Feb 9, 2020

Thanks -- do you want to include --targetprofile in this PR? If so I'll not merge until that's added.

@baronfel
Copy link
Contributor Author

baronfel commented Feb 9, 2020

I went ahead and added it.

The valid values are (taken from the F# compiler codebase):

// Indicates we assume "mscorlib.dll", i.e .NET Framework, Mono and Profile 47
| "mscorlib" -> PrimaryAssembly.Mscorlib
// Indicates we assume "System.Runtime.dll", i.e .NET Standard 1.x, .NET Core App 1.x and above, and Profile 7/78/259
| "netcore"  -> PrimaryAssembly.System_Runtime
// Indicates we assume "netstandard.dll", i.e .NET Standard 2.0 and above
| "netstandard"  -> PrimaryAssembly.NetStandard

but all code in the compiler uses one of "mscorlib" or "netcore", so for SharpLab that seems a reasonable path to follow.

@ashmind
Copy link
Owner

ashmind commented Feb 9, 2020

I wonder if we want to provide string constants for those, but anyways can always add later.

@ashmind ashmind merged commit d49bfb0 into ashmind:master Feb 9, 2020
ashmind added a commit to ashmind/SharpLab that referenced this pull request Feb 23, 2020
@joelpryde
Copy link

Is there any way to set the TargetProfile for normal CSharp compilation? I can't seem to find that option.

@psfinaki psfinaki mentioned this pull request May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants