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

Make FSharp.Core nuget package netstandard2.0 only #893

Closed
4 tasks done
KevinRansom opened this issue Jul 6, 2020 · 7 comments
Closed
4 tasks done

Make FSharp.Core nuget package netstandard2.0 only #893

KevinRansom opened this issue Jul 6, 2020 · 7 comments

Comments

@KevinRansom
Copy link

KevinRansom commented Jul 6, 2020

Make FSharp.Core nuget package netstandard2.0 only

I propose we ... make FSharp.Core nuget package netstandard2.0 only starting from FSharp.Core version=5.0.0

The existing way of approaching this problem in F# is FSHarp.Core nuget package ships a desktop and a netstandard 2.0 version of the FSharp.Core library

Pros and Cons

The advantages of making this adjustment to F# are :

  • F# apps and libraries can target one or more framework references compatible with netstandard2.0
  • Developers will not need to provide desktop and netstandard versions of their libraries.

The disadvantages of making this adjustment to F# are :

  • Microsoft recommends that netstandard2.0 code executes on net472 and up.
  • net472 was released: on 2018-04-30 and is in widespread adoption.

Extra information

For developers who wish to target versions of the dotnet framework earlier than net472 they can use the FSharp.Core4.7.* nuget packages, but would forego future language features that depend on later revisions of FSharp.Core.

We considered moving to netstandard2.1, however, that would have forgone target the desktop net framework completely and decided that, at this time we would prefer to continue to support developers targetting the latest release of the desktop.

S

Estimated cost (XS, S, M, L, XL, XXL):

Related suggestions: (put links to related suggestions here)

Affidavit (please submit!)

Please tick this by placing a cross in the box:

  • [X ] This is not a question (e.g. like one you might ask on stackoverflow) and I have searched stackoverflow for discussions of this issue
  • I have searched both open and closed suggestions on this site and believe this is not a duplicate
  • This is not something which has obviously "already been decided" in previous versions of F#. If you're questioning a fundamental design decision that has obviously already been taken (e.g. "Make F# untyped") then please don't submit it.

Please tick all that apply:

  • This is not a breaking change to the F# language design
  • I or my company would be willing to help implement and/or test this

Design discussions: fsharp/fslang-design#482
DCR - PR: https://github.com/fsharp/fslang-design/pull/483/files

@abelbraaksma
Copy link
Member

Great idea, but is there anything in FSharp.Core that currently requires net47x that wouldn't be available on NetStandard 2.0?

If not, it sounds like a simple compiler switch and cleanup (like those jobs still running 4.6) and I, and likely many others with me, can get rid of having two build targets for libraries.

@KevinRansom
Copy link
Author

@abelbraaksma

Great idea, but is there anything in FSharp.Core that currently requires net47x that wouldn't be available on NetStandard 2.0?

Not as far as I recall the API surface area for both is identical.

@dsyme
Copy link
Collaborator

dsyme commented Jul 6, 2020

Sounds great.

FSharp apps and libraries will target a single set of framework references ... netstandard2.0.

Clarification: "F# apps and libraries can target one or more framework references compatible with netstandard2.0"

@KevinRansom
Copy link
Author

Clarification: "F# apps and libraries can target one or more framework references compatible with netstandard2.0"

updated text with this clarification.

@cartermp
Copy link
Member

cartermp commented Jul 7, 2020

This should also be done with the change: dotnet/fsharp#7433

@pimbrouwers
Copy link

pimbrouwers commented Jul 11, 2020

I did this for the core of FSharp.Data.Json (https://github.com/pimbrouwers/FSharp.Data.Json) and it's been flying off the shelves since then.

But seriously, I think this is a great idea. I'd happy to help lend a hand to this.

@dsyme
Copy link
Collaborator

dsyme commented Jun 9, 2022

Completed here: https://github.com/fsharp/fslang-design/blob/main/tooling/FST-1030-FSharp.Core%20nuget%20package%20netstandard%202.0%20only.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants