-
Notifications
You must be signed in to change notification settings - Fork 822
FCS API internalizations and renamings #10756
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
Conversation
Yes, none of these should have ever been accessible IMO. |
Of these, the only ones FSAC cares about is the File System and Shims, and since those are explicitly called out I think we'll be fine. |
@baronfel Thanks for confirming this - I'm also working on Internal.Utilities.StructuredFormat and FSharp.Compiler.Layout. Do you use anything from there? |
@dsyme Nope, we seem to be free of usages for those as well. |
We don't use them yet, but there're plans to start. |
@auduchinok Could you run me through what you need please? IIRC you need
plus the ability to create ILModuleDef and its consitutent parts? But you don't need to create IL code. Yes I think we can make enough public for you |
I've made the things necessary for the ILModuleReader API hook public, I think it's enough for your needs but you will need to verify |
@cartermp @KevinRansom @TIHan This work was motivated by discussion today with @migueldeicaza concerning getting sufficient analyzer support into VS Code. It doesn't get us anywhere near that point but is at least a step towards a binary compatible FCS |
As part of this I noticed a subtle difference int the layout code where we have two different implementations of
and
I'm switching to use the first (the second gives incorrect results). But the second is the one that's currenly in use in FSharp.Core. Tests should reveal if there are any small discrepencies between these (I'd only expect improvements TBH) |
This is ready @KevinRansom @cartermp @TIHan @vzarytovskii Please approve when you can @auduchinok I believe what's public should be sufficient for the assembly reader hook, if not we can make exactly the right things public in a separate PR. I might also move the two hooks into a separate explicit API in SourceCodeServices. |
In the past I used |
@goswinr This is what we use in FSharpFar, hope this helps (you need to chaise |
You can use In FCS 40.0 the Layout will actually disappear and just be replaced by If you are also composing layouts please let me know. |
The FSharp.Compiler.Service API has grown organically as various contributors (including myself) made more things more public. Many of these were never designed nor intended to be made public, and are not used in any way by any particular clients that can't be adjusted.
For example, much of
FSharp.Compiler.AbstractIL.Internal.*
was public - the hint is in the name, this stuff is internal to the F# compiler. Indeed all ofFSharp.Compiler.AbstractIL
should be regarded as internal apart from the ILModuleReader hook used to allow alternative backing stores.This trims off about 23,000 lines out of the baseline for the FCS API (that's about half of the API surface area).
The vast majority of the rest of the "inadvertent" part of the API is FSharp.Compiler.SyntaxTree, we can discuss that later.