fsprojects / FSharp.Formatting

F# tools for generating documentation (Markdown processor and F# code formatter)
https://fsprojects.github.io/FSharp.Formatting/
Other
462 stars 155 forks source link

Can we enforce the required version of FCS ? #731

Closed MangelMaxime closed 2 years ago

MangelMaxime commented 2 years ago

When upgrading to v14.0.1, to get access to the XML doc comment I had this is error:

Could not read comments from entity 'Ws.WebSocketStatic.CLOSED': System.MissingMethodException: Method not found: 'Boolean FSharp.Compiler.Syntax.PrettyNaming.IsOperatorName(System.String)'. at FSharp.Formatting.ApiDocs.SymbolReader.readMemberOrVal(ReadingContext ctx, FSharpMemberOrFunctionOrValue v) at FSharp.Formatting.ApiDocs.SymbolReader.tryReadMember@2516.Invoke(String cat, Int32 catidx, Boolean exclude, IDictionary2 _arg1, ApiDocComment comment) at FSharp.Formatting.ApiDocs.SymbolReader.readCommentsInto$cont@2455[c](FSharpSymbol sym, FSharpFunc2 f, FSharpOption1 nsdocs, ApiDocComment comment, IDictionary2 cmds, String cat, Unit unitVar)

It seems like this error is coming from the fact that I upgraded FCS at the same time to version 41.0.1.

image

Should FSharp.Formatting be more strict in it's dependencies constraints on Nuget?

MangelMaxime commented 2 years ago

However I'm not sure why I have FCS as dependencies on my side, as it should be installed with F# Formatting by default.

Perhaps, this is a remainder of when I was experimenting for Nacara.GenApi. I will try removing it this evening and see if things still compiles

dsyme commented 2 years ago

@MangelMaxime Yes it looks like your paket resolution has bumped FCS up to 41, but 40 is requried and they are not binary compatible.

Is it possible for the FCS package to declare that future major versions of it will not be binary compatible? If that's possible I don't know the magic foo necessary.

MangelMaxime commented 2 years ago

Pinning FCS does fix the problem indeed.

Is it possible for the FCS package to declare that future major versions of it will not be binary compatible?

I don't think you can do that, but I think on NuGet it is possible to say that we want latest version of FCS 40.*.

https://docs.microsoft.com/en-us/nuget/concepts/dependency-resolution#floating-versions

However, I am not sure if Paket allows to specific this kind of floating versions.

Feel free to close this issue, if you think no action is required on F# Formatting side.

dsyme commented 2 years ago

Thanks!