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

Use FCS nuget package #2573

Merged
merged 9 commits into from
Nov 9, 2021
Merged

Use FCS nuget package #2573

merged 9 commits into from
Nov 9, 2021

Conversation

alfonsogarciacaro
Copy link
Member

@ncave If I'm understanding correctly latest improvements in the F# compiler, FCS already does some similar caching to service_slim so may be it's a good opportunity to use the Nuget package directly and reduce the work of maintaining a fork. Only thing is we still need to maintain/update fcs_fable for the repl and fable-compiler-js... and by "we" I mean "you" ;) What do you think?

@ncave
Copy link
Collaborator

ncave commented Oct 28, 2021

@alfonsogarciacaro Looks good to me. It was never a goal in itself to maintain a fork of FCS for .NET, it was only to overcome the transitional period when FCS was released less often and from a downstream repo. For FCS-Fable (repl and fable-compiler-js) I will have to maintain the forks, it's not that much effort, and it's nice to let people play with Fable online.

That said, I need to update the forks soon, do you have a preference which dotnet/fsharp branch to use, or do we just do main and stay on the bleeding edge (as always :) ?

@ncave
Copy link
Collaborator

ncave commented Oct 28, 2021

@alfonsogarciacaro What does the performance looks like after switching to fcs-nuget, any difference on large projects?

@alfonsogarciacaro
Copy link
Member Author

I spent some time trying to see if we could parallelize the build or release memory for already compiled files. But this didn't yield positive results. I haven't properly measured compilation as it's now, I just run it once on a big project and the first impression was the speed was more or less the same, but I need to check how watch compilations behave.

@alfonsogarciacaro
Copy link
Member Author

@ncave These are the numbers I got when compiling fable standalone. I triggered the watch compilation by touching illib.fs which is at the top of the file list.

  • main

    • First F# compilation: 19457ms
    • Watch F# compilation: 11602ms
  • fcs-nuget

    • First F# compilation: 18765ms
    • Watch F# compilation: 11908ms

So the numbers are very similar. Maybe we could improve the watch compilation for files on top of the list by checking only the dirty files instead of the whole project, but that would be a different PR :)

@alfonsogarciacaro
Copy link
Member Author

@ncave You're probably already into it, but I already tried to fix fcs-fable (better to hide whitespace to see the diff, I just added |> Seq.toList wherever the compiler was complaining).

Actually I'm a bit puzzled I had to fix some build errors in fcs-fable because these files weren't touched 🤔

However, when trying to build Fable.Standalone I still get this error:

src\fcs-fable\src\fsharp\TypedTree.fs(1,1): error EXCEPTION: The exception has been reported. This internal exception should now be caught at an error recovery point on the stack. Original message: Exception of type 'FSharp.Compiler.ConstraintSolver+ConstraintSolverError' was thrown.)
Compilation failed

Not sure if it rings a bell. It'd be nice to be able to merge this with fable-standalone working, but we can also wait until fcs-fable is updated to keep it in sync with Fable.Cli.

@ncave
Copy link
Collaborator

ncave commented Nov 9, 2021

@alfonsogarciacaro I was waiting for F# 6 and .NET 6 to officially drop before I start on fcs-fable, I guess I'll have to start now that it is released.

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.

None yet

2 participants