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

WebSharper.Compiler package dependencies #929

Open
Jand42 opened this Issue Mar 16, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@Jand42
Member

Jand42 commented Mar 16, 2018

Currently, there is a single WebSharper.Compiler package that contains all compiler dlls as lib references. It has no package dependencies on either FSharp.Compiler.Service or Microsoft.CodeAnalysis.CSharp right now, with the intention that using only one of F# or C# paths would not need installing both FCS and Roslyn.

This requires that in any project using WebSharper.Compiler for compiling from source, compatible versions of FCS and/or Roslyn packages needs to be added by hand (and also kept compatible by hand when the FCS/Roslyn version used by WebSharper is changing).

Proposal is to break this up into multiple packages:

  • WebSharper.Compiler.Common would contain the WebSharper.Compiler.dll and depend on Mono.Cecil and WebSharper packages. It would be useful for apps that want to compile F# quotations (but not source) at runtime, and tools that inspect WebSharper metadata.
  • WebSharper.Compiler.FSharp would contain the WebSharper.Compiler.FSharp.dll and depend on WebSharper.Compiler and compatible version(s) of FSharp.Compiler.Service.
  • WebSharper.Compiler.CSharp would contain the WebSharper.Compiler.CSharp.dll and depend on WebSharper.Compiler and compatible version(s) of Microsoft.CodeAnalysis.CSharp.

Optionally:

  • WebSharper.Compiler package would continue to exist but no content in itself, just a superset of WebSharper.Compiler.FSharp and WebSharper.Compiler.CSharp.
  • WebSharper.Sitelets.Offline would contain the WebSharper.Sitelets.Offline.dll and depend on WebSharper.Compiler. This is needed for generating WebSharper offline html+js sites programmatically (not used anywhere afaik, API could use some improvement for this to be easier to set up if needed)
@cata

This comment has been minimized.

Contributor

cata commented Mar 16, 2018

This would work great for our current use case!
With this in place, we would be using WebSharper.Compiler.FSharp and remove the explicit dependencies we currently hold on Mono.Cecil and FSharp.Compiler.Service

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