fable-compiler / fable-react

Fable bindings and helpers for React and React Native
MIT License
275 stars 66 forks source link

netstandard2.0 target #38

Closed et1975 closed 7 years ago

et1975 commented 7 years ago

Is it strictly necessary? Are we using any of the netstandard2.0? I believe we should keep targeting 1.6, while migrating the build itself to SDK 2.0. This would lower the requirements for the consumers, which is a good thing.

EDIT: Elmish building with SDK 2.0, targeting netstandard1.6 - https://github.com/fable-elmish/elmish/blob/master/src/Fable.Elmish.fsproj

MangelMaxime commented 7 years ago

I think like @et1975 if we can avoid to force user to upgrade their project would be nice. For example, if I make public next version of Fable.Elmish.Bulma all the users would be forced to upgrade their systems and projects. Could be better to not force them IMO. As it's kind of breaking change we could avoid no ?

MangelMaxime commented 7 years ago

Wait I just think about something.

With Fable we are sharing the fsproj file which itself target netstandard2.0 so in any case we need the users to update to it no ?

et1975 commented 7 years ago

Yes, if Fable.Core targets 2.0 we may have to upgrade anyway... and Fable.Core will probably want to target netstandard2.0 for ... TypeProviders? What else is it good for in JS world? cc @enricosada @ncave @alfonsogarciacaro

alfonsogarciacaro commented 7 years ago

My main reason was that netstandard2.0 doesn't have the System.XXX dependencies so I was guessing that moving everything to netstandard2.0 we could alleviate the size of the packages folder. However latest Paket version has an option to use Nuget cache instead and I'm working to make Fable able to access library sources even if they're not in the packages folder. If it works, we may not need to upgrade everything to netstandard2.0 at the end :)

MangelMaxime commented 7 years ago

Ok, so we would need to update a project to netstandard 2.0 only if it's use a netstandard 2.0 feature ? Like type providers ?

MangelMaxime commented 7 years ago

Even if Fable.Core doesn't target 2.0, if any of the lib used by the user use an fsproj with 2.0 format (no manual FSharp.Net.SDK in it) then will users need to upgrade to netstandard 2.0 ?

I am asking the question because in order to build a library with netstandard 2.0 runtime we need to modify the fsproj (remove FSharp.Net.SDK references, etc.). But when working on a project including both netstandard 2.0 and netstandard 1.6 libs it's compiling. Which is normal as netstandard is orthonogal to 1.6.

However Fable, use internally project reference to include others project files into your application and access the whole AST etc. And it's working even if some of the fsproj are using netstandard 1.6 format. Is it only the main project which need to implement the runtime specificities ?

alfonsogarciacaro commented 7 years ago

I've released a fable-react 1.2.0-beta-002 targeting netstandard1.6 again :+1: But please note there're still a few breaking API changes (basically you'll have to remove the !^ wherever the compiler complaints).

MangelMaxime commented 7 years ago

I am closing as we released a stable version.