-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add .NET Core (CoreCLR) build of FSharp.Compiler.Service.dll #465
Comments
Just to check - do you want
If 2 please add more details about your use cases. |
Essentially, I would like the ability to compile and run F# code on CoreCLR/CoreFX using the new Are you planning to add official support for building F# code using the new |
Ah ok - I see. We'll need to integrate the work from Microsoft\visualfsharp coreclr branch once it's stable - those are the changes needed to bring up the compiler (and this compiler service) on CoreCLR. I think the core of the work relevant to the compiler service is already stable and can be brought over - perhaps into a CoreCLR branch here. |
Sounds great! I'll keep an eye out for said branch :) |
OK, it's time to bring this to life again... The steps we need to get a .NETCore FCS are: :[x]: Integrate from Microsoft/visualfsharp --> fsharp/fsharp --> fsharp/FSharp.Compiler.Service :[ ] Add build support for CoreCLR to this repo. Basically copy the appropriate dependencies and settings from Microsoft/visualfsharp to this repo if they didn't come across as part of the integration. :[ ] Build it, test it on CoreCLR :[ ] Ship an updated Nuget For #1, there is an integration from Microsoft/visualfsharp --> fsharp/fsharp going on here; fsharp/fsharp#558. It's still work in progress |
Thanks for the update! The F# tooling for .NET Core has mostly fulfilled my requirements that originally motivated this issue. However, I'm sure there will be many other potential use cases for a .NET Core FCS package for other developers. Regardless, thanks for the effort to bring F# into the Core fold! |
@ncave The first step is now complete. Would you be able to help add a .NET Core build of this component? |
@dsyme Awesome! Just to clarify again, is your preference to start here, or can we add coreclr FCS to fsharp/fsharp, as stated in the Looking Ahead section, paragraph 1 of fsharp-contributions? |
@ncave We should start here. At least, give it a go and find out why it's hard. The code is all ready and integrated after this, we just need to work out how to build and test it. It can't be that hard, can it? :) One of the reasons I'd like to do things here is to understand better what it means to add a .NETCore build+test for an existing, standard F# repository. This is a somewhat orthogonal goal but we need to make sure it is "easy". We are going to have to do this for 100s of repositories over the coming year. There are various ways to add .NET Core support to a repo. Some examples are:
All this is kind of unsatisfactory: to be honest it seems that adding .NET Core support is still quite hard. And I will admit that I hate fractured, parallel-world build systems. I can see now why you just went and modified Microsoft/visualfsharp (because the build+test is already set up in that repo). But equally we must make adding .NET Core build+test support simpler. I was also curious to know if it's possible to use Paket+.fsproj+msbuild to build dnxcore/netcore/netstandard components (though all the stuff linked above will still presumably be needed if we want to test anything). What I found is this:
|
I'd like too to see a clean implementation of a fsproj supporting .net core, with paket if possibile. Long comments, as usual sorry Some more info: fsharp daily is not daily ciThe nuget it's published when a new version is needed.
the previous version supported About put netcore in that in same About .net cliTo write info about current situation (initial committed code may be old/dirty) build scriptto run a build and create a package, you need only to do
to build and run a project (like tests)
appveyor and travisboth config just download a script. The script download the .net cli ZIP, unzip in a subdirectory, and add that to a clean template/example of both are:
i can do also it's possibile to use system packages instead of unzip in a directory, but i prefer unzip because i can try that locally without messing up my machine. official docs of .net cli install scenario: https://github.com/dotnet/cli/blob/rel/1.0.0/Documentation/cli-installation-scenarios.md my build scripts in FsSrGen and other prI write a lot of code for build because i like to split commands in multiple task/targets. In the other pr (chessie/suave) i tried initially to NOT mess with their build file, and run commands in appveyor/travis after build. Some examples:
|
Thanks @dsyme and @enricosada, the examples help a lot. |
@ncave Overall, I'd say that for now we would accept a PR that adds .NETCore build + test support along the lines of Suave or FsSrGen, even if that means we end up with two build systems and duplication of the messy stuff from those repos. Presumably we can clean it out later. Criteria would be
Perhaps much of that travis/appveyor/powershell stuff could go away if some CoreCLR helpers were added to FAKE. I'm actually les concerned about running tests than you might think and we could release a pre-release without it, as long as a basic manual test has been done. This code is a fork of http://gitub.com/Microsoft/visualfsharp, we can assume CoreCLR testing has been done. |
@enricosada Thanks for the notes! dotnet cli is nice as a project builder. Is there FAKE support for it yet? Does there need to be? That would seem to be important. Perhaps it's a one liner but it would be nice to have a sample. Currently I feel that the simple task of targeting "netstandard" as a profile is forcing people to change everything:
This amount of change is really hard to get your head around. I just wish things were a bit more independent, e.g.
|
@dsyme i can do the pr test it's easy, we can run nunit 3 tests (or whaterver) with .net core, already done that for chessie, ref this commit |
Yes, @dsyme see my previous comment, there is the example of fake integration in chessie. |
@enricosada I think it's important to make this replicable, so other people can do what you've been doing, and are happy to do it. So I might ask you to let @ncave have a crack at this (@ncave - what do you think - would you like to?), and then review? Some other comments
|
@enricosada Thanks for the FAKE sample, that's helpful. Is it possible to avoid the dependency on "mergenupkg" here? I don't want to depend on any non-standard extensions to dotnet-cli, and simply use it as a DLL builder called by FAKE. |
@dsyme Atm is not possible, but the only problem i see is paket template (for create the nuspec) doesnt support multiple frameworks ( ref fsprojects/Paket#1539 ). We can add files (it's easy with paket template), but not new dependencies for |
Sure, just ping me if someone need help. a basic migration guide is there.
so you dont get all the issues together, more mechanical |
Yep, I know. But it's one more tool and I really want to Occam's Razor this. For the purposes of what we're trying to achieve here, we don't need to do a |
@dsyme sure, just tell paket to download the |
Two things
thanks! |
Not quite what I meant - I mean we just call |
i think i am moving that to github.com/dotnet/netcorecli-fsc/ the new home
The wiki is public, i wrote about it the home, just change it, i'd love to (for example FAQ) |
OK, great
OK, thanks! |
@dsyme fake packaging use paket template, and you can put additional file inside, but not specify dependencies for additional frameworks for nuspec, so i cannot add depdencies for |
Ah, I see! Yes, so that information in the intermediate nuget package is very valuable, I now understand why you ended up with If Paket supported both "netstandard" and fsprojects/Paket#913 then I assume you wouldn't need this step? |
@dsyme yes, should work. |
@dsyme Thanks I'll take a crack at it with fake as in the Chessie netcore build that @enricosada contributed (great wiki, thanks!). |
@ncave Awesome. Don't hesitate to ask questions - we're all learning here :) I even grab @enricosada on Skype sometimes :) |
@ncave what's missing there? how can i help? As recap, what's ok/missing?
|
i checked project.json, i think only deeps need to be changed the .NET Core deps are merged inside normal FCS package?i dont see where that's is done. i think is useless to have two packages (normal and .netcore), just one with multiple framework supported. deps
use also i think we can remove import of appveyorAlso appveyor doesnt need two build job anymore i think |
@enricosada Thanks for the dotnet-mergenupkg link.
|
@nave just open I'll send a pr for preview2 fix and dotnetmergenupkg (it's already in dev, works ok, probably today) i think i can just update the fslexyacc (current sources) to dnc, as |
This has been added, a separate bug tracks nuget package for this |
The new RC of CoreCLR, CoreFX, and dnx means that applications can now be built using these tools. Please add a Nuget package targeting
dnxcore
or better yetnetstandard
so that F# apps can be written on this new platform. The CoreFX team has a great writeup on the new standard dotnet API. A compiler plugin for dnx has already been written.The text was updated successfully, but these errors were encountered: