Repository navigation
Fix packaging on preview sdks - #11661
Merged
Merged
Conversation
jonsequitur
approved these changes
Jun 9, 2021
brettfo
approved these changes
Jun 9, 2021
KevinRansom
added a commit
that referenced
this pull request
Jun 10, 2021
cherry pick : Fix packaging on preview sdks #11661 to dev16.10
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.
When FSharp is run on a preview SDK we want users to have access to the preview FSharp.Core so that preview language features will work.
So we have some machinery to do that here https://github.com/dotnet/fsharp/blob/main/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.props#L83
In order to locate the preview FSharp.Core we have to add a package source to an azure feed here
https://github.com/dotnet/fsharp/blob/main/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.targets#L56
There is a bug, when we add the feed we don't take into account the build variable: DisableFSharpCorePreviewCheck which was implemented to disable access to preview FSharp.Cores.
Mostly that doesn't matter, which is why no one has noticed, however, notebooks use the same feed for internal and preview builds, and when breaking changes happens, we can inadvertently break scripts that use packages built on the dotnet interactive assemblies, when a preview dotnet sdk is installed on the machine.
This change fixes the bug mentioned above by ensuring that setting DisableFSharpCorePreviewCheck turns off using the preview FSharp.Core. It also updates the package manager so that it sets DisableFSharpCorePreviewCheck to true.
However, if a developer has a global json that pins dotnet to use a specific release of the dotnet sdk, then that older sdk will still have the bug, so this change also disables _NETCoreSdkIsPreview when doing #r "nuget" this is perfectly benign since #r nuget does not and should not rely on _NETCoreSdkIsPreview.
/cc @jonsequitur