Skip to content

Conversation

@matthid
Copy link
Contributor

@matthid matthid commented Aug 17, 2017

See #3451

@msftclas
Copy link

@matthid,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@KevinRansom
Copy link
Contributor

@matthid we have not yet published a 4.1.X package from this repo. And master branch is quite a way ahead of the released FSharp.Core packages.

Should I manually put together an updated package using already released binaries, or are you okay with waiting until we update the dotnet cli?

@matthid
Copy link
Contributor Author

matthid commented Aug 17, 2017

To be honest I wasn't after an updated 4.1.X release, but I figured when I'm already at fixing this I can fix it there as well. So if we ever do another release it should contain the fix, but I'm ok with an updated 4.2.X release.

So to answer your question I'm OK with waiting. This is not urgent, but it will be quite an annoyance when we forget it and people start using higher frameworks

@KevinRansom
Copy link
Contributor

@matthid

I will have to push a new release to align with VS2017.4 preview 1. Not being a PM I don't really know when that is, but shortly. Unfortunately the bits for it are already built, so I will have to manually make them ... well not really manually but you know what I mean.

As for Net Standard 2.0 support. When F# moves to Net Standard 2.0 we will very likely deprecate F# support for NetStandard1.6, the experience we had with portable profiles encourages us to never go there again. There will be a Desktop and NetStandard 2.0 library. Anyone who wants NetStandard 1.6 will use the final shipped 4.2.* library.

I do not have a date for when we will make this change to F#, it depends on schedules ... Right now we can't make that change because the DotNet cli 1.1.1 and VS 2017.3 still rely on NetCore 1.X, and we have no way to pre-req dotnet cli 2.0. My current expectation is that we will move F# over to NetStandard 2.0 only before the end of this year.

@KevinRansom
Copy link
Contributor

KevinRansom commented Aug 17, 2017

@matthid Apparently it will be VS2017.4 Preview .2. That's the next update to F#

@KevinRansom KevinRansom merged commit dc744fd into dotnet:master Aug 17, 2017
@cartermp
Copy link
Contributor

In terms of .NET Standard support:

.NET Core 1.1 and .NET Standard 1.6 are supported for one year as of August 14th. Whether or not we make a change towards .NET Standard 2.0 during that time frame is unknown, but we will not be deprecating the FSharp.Core release that targets .NET Standard 1.6 until at least a year from now.

@matthid
Copy link
Contributor Author

matthid commented Aug 17, 2017

Ok I see what you are saying, if 2017.4 preview 2 contains this fix that would be nice (if I got that correctly).

About the netstandard20 thing:

  • NuGet is actually not really designed to drop platforms, so this is always a painful process for some people
  • I don't see why Microsoft is rushing into droping platforms so fast out of the package (I guess because it is hard do communicate that a particular platform build was NOT updated and still contains the OLD binaries)
  • If [Discuss] Fix packaging netstandard20 #3454 works technically (IE including the group without an actual netstandard20 build) I don't see why we shouldn't do it.

@KevinRansom
Copy link
Contributor

@matthid Yep that is the goal.

There is no good reason to continue re-packaging the old dll in newer and newer packages. Just referencing the specific package you need should be sufficient to acquire the dll that is needed by the build.

Kevin

@forki
Copy link
Contributor

forki commented Aug 17, 2017

@KevinRansom it's not. The problem is that the rest of the world moves on and wants to build for old and new platforms. We don't live in isolation.

Current situation means other packages can only build for old platforms or new platforms. But only with very very hard work against all.
This is probably not a problem for apps, but it is for libs.

@forki
Copy link
Contributor

forki commented Aug 17, 2017

Sorry for being so short here. It's late.

Will try to explain in more depth tomorrow.

@KevinRansom
Copy link
Contributor

I think the project file would like this, which doesn't seem very terrible.

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFrameworks>netstandard1.6;netstandard2.0</TargetFrameworks>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
    <FSharpCoreImplicitPackageVersion>4.2.*</FSharpCoreImplicitPackageVersion>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="Program.fs" />
  </ItemGroup>


</Project>

@matthid
Copy link
Contributor Author

matthid commented Aug 17, 2017

Current situation means other packages can only build for old platforms or new platforms. But only with very very hard work against all.

Yep, and ironically NuGet/dotnet-sdk is now in the same situation as Paket, to require different versions for different platforms is just not how NuGet was designed to work. That's the hole reason why they support multiple platforms in a SINGLE package. Idea is that you add platforms, not remove them.
Note that I'm not saying that there is no point when you remove them again - just that we should think about how it hurts us to distribute OLD binaries with newer packages. If it's a customer communication problem we need to find a solution for that.

But right now I'm not even suggesting that. Can we somehow test how #3454 would behave technically? Is a prerelease something we can achieve and test with? Maybe I test this on AppVeyor and report back, though thoughts about it are very welcome.

@matthid
Copy link
Contributor Author

matthid commented Aug 17, 2017

I think the project file would like this, which doesn't seem very terrible.

@KevinRansom We don't say it isn't possible, we say that it is hard. And managing multiple versions is hard. Does pack generate the correct nupkg (ie correct versions in correct framework groups)? Is this really worth breaking pakets unification logic?

Generally NuGet packages should support more platforms the lower they are in the dependency tree. Requiring multiple versions on a consumer side makes it very hard to think about your dependencies and debug issues, we are really opening a can of worms here.

@forki
Copy link
Contributor

forki commented Aug 17, 2017 via email

@forki
Copy link
Contributor

forki commented Aug 17, 2017

Sorry for snark. It's too late.

Tomorrow...

@KevinRansom
Copy link
Contributor

@forki ... dood, that's not snark ... you should see how my kids talk to me .... now that's snark :-)

KevinRansom pushed a commit that referenced this pull request Aug 17, 2017
* Document project options and mark lots of things as deprecated (#3449)

* Document project options and mark lots of things as deprecated

* delete some code that is no longer used

* fix packaging of FSharp.Core. (#3452)

* implement IDisposable interfaces explicitly  (#3447)

* added IDisposable

* reverted Dispose change

* ngen open source install (#3456)

* handle "Blue (high contrast)" theme (#3443)
@KevinRansom
Copy link
Contributor

I seem to have forgotten, why is providing an FSharp.Core for Net Standard 2.0 important? Since the NetStandard 1.6 one will work everywhere that the NetStandard 2.0 version will, and we don't require any new APIs?

@matthid
Copy link
Contributor Author

matthid commented Aug 18, 2017

@KevinRansom it's about user experience. One of the selling points of v2 is that you no longer need to download a mass of packages. A lot of work went into this.

Problem is F# projects cannot participate as long as we have no empty netstandard20 in the package (NuGet/Paket have no choice but to download all deps)

We know that this cannot happen over night and you will have some packages depending on netstandard16 packages. But FSharp.Core is the most important package that needs this change and it needs it first if we want to participate otherwise this BLOCKS ALL F# library authors to make their customers benefit from this.

@cartermp
Copy link
Contributor

I agree with @matthid that the experience there would be kind of lame: downloading the package graph for netstandard1.6 if I'm only doing 2.x stuff is a bit much. I expect the "takeover" of 2.0 to be quite rapid, do I'm certainly not opposed to getting a netstandard2.0-based FSharp.Core out there.

Does revving a new version of FSharp.Core right now seem "right" to you right now @matthid @forki?

@matthid
Copy link
Contributor Author

matthid commented Aug 18, 2017

netstandard2.0-based FSharp.Core

Can you elaborate what that even means?

All I'm suggesting is to add the NuGet dependency group (if that works technically) or to ADD another binary.

Note that I'm already trying to find a solution which is working for you but we cannot meet anywhere if I don't understand why you think it is so important to have only a single binary (ie start a new version without 1.6 support)

@forki
Copy link
Contributor

forki commented Aug 18, 2017 via email

@KevinRansom
Copy link
Contributor

@forki
how will empty deps work for compilation or deployment for that matter? Unless you are hoping that the compiler will happily find the references from some other dependency and so opportunistically work.

My preference is to only ship a NetStandard1.6 assembly for ever ... since it works in the most places. NetStandard 2.0 works in all of the same places. And so does NetStandard 2.0.

As for the dependency download I'm sort of in the who cares bucket about that because:

  1. Anyone building an app will use netcoreapp2.0 which is also a bunch of contract assemblies and so is to use your phrase a huge graph. therefore any developer who needs to deploy and test her app on netcore will need to download and deploy that huge graph.
  2. Nuget and, I presume, paket can and should cache the download making it a one time cost.

We can certainly build and ship netstandard1.6 and netstandard2.0 and presumably netstandard 2.1, 3.0, 4.0 blah blah blah specific versions of FSharp.Core. However ... that wasn't that straightforward with portable libs before and doesn't really gain us any platform reach and increases the download size of the FSharp.Core package for every developer.

So specifically and technically why is NetStandard 1.6 a bad thing, why is caching the download problematic?

I think not specifically defining the packages netcore 2.0 dependencies and opportunistically relying on the dependencies of other referenced packages to find the framework references is flat wrong. And in someways is reminiscent of the ambient F# core versioning issues that we have always had.

@dsyme
Copy link
Contributor

dsyme commented Aug 18, 2017

Anyone building an app will use netcoreapp2.0 ...

But what of people building .NET Standard 2.0 libraries. For example, pretty much all of MBrace or Akka.NET or the like?

...and presumably netstandard 2.1, 3.0, 4.0 ...

It feels like 1.6 --> 2.0 is qualitatively very different, basically a reset of the ecosystem.

So specifically and technically why is NetStandard 1.6 a bad thing

My understanding is that it is because it exposes all users of the library (including those just doing .NET Standard 2.0+ library development) to pre-.NETStandard 2.0 "many small packages" framework, and there's no way for users to avoid that. This kind of makes it feel like F# is behind-the-times, keeping the user tied to heavy ways of engineering

@forki
Copy link
Contributor

forki commented Aug 18, 2017 via email

@matthid
Copy link
Contributor Author

matthid commented Aug 18, 2017

@KevinRansom

I think not specifically defining the packages netcore 2.0 dependencies and opportunistically relying on the dependencies of other referenced packages to find the framework references is flat wrong.

No, basically they changed with netstandard20 how this stuff works. Now you can always assume that when you are on netstandard20 that all APIs are available on the target runtime for this Standard (which is a sane assumption). This means the SDK will add the NetStandard.Library package IMPLICITLY, this package will then have all the reference assemblies required for compilation. But you no longer need EXPLICIT dependencies for packages already in the standard.

(Note: This might not be completely technically accurate...)

@matthid
Copy link
Contributor Author

matthid commented Aug 18, 2017

Or in other words: There is no longer a "half" standard, either a runtime implements the complete standard and stuff works or not. Basically FSharp.Core currently specifies a "part" of the netstandard16 which it depends on, this is now no longer required and implicit.

At least that is my understanding of this stuff.

@forki
Copy link
Contributor

forki commented Aug 18, 2017 via email

@hickford
Copy link

hickford commented Nov 6, 2017

Can anyone here help with this similar bug fscheck/FsCheck#410 ? In this case, the nuspec file is generated from a paket.template file

nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Jan 26, 2022
* Document project options and mark lots of things as deprecated (dotnet#3449)

* Document project options and mark lots of things as deprecated

* delete some code that is no longer used

* fix packaging of FSharp.Core. (dotnet#3452)

* implement IDisposable interfaces explicitly  (dotnet#3447)

* added IDisposable

* reverted Dispose change

* ngen open source install (dotnet#3456)

* handle "Blue (high contrast)" theme (dotnet#3443)
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.

7 participants