Skip to content

Fix packaging on preview sdks - #11661

Merged
KevinRansom merged 1 commit into
dotnet:mainfrom
KevinRansom:fixpreviewsdk
Jun 9, 2021
Merged

KevinRansom merged 1 commit into
dotnet:mainfrom
KevinRansom:fixpreviewsdk

Conversation

@KevinRansom

Copy link
Copy Markdown
Contributor

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

@KevinRansom
KevinRansom requested a review from brettfo June 9, 2021 20:34
@KevinRansom
KevinRansom merged commit cbd5f17 into dotnet:main 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
@KevinRansom
KevinRansom deleted the fixpreviewsdk branch January 21, 2022 09:08
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