-
-
Notifications
You must be signed in to change notification settings - Fork 37
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 support for reference assemblies to ProjInfo #200
Conversation
b94bb28
to
d459c98
Compare
@@ -804,13 +806,14 @@ module ProjectLoader = | |||
"BaseIntermediateOutputPath" | |||
"IntermediateOutputPath" | |||
"TargetPath" | |||
"TargetRefPath" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to grab the property in the first place
TargetRefPath = | ||
props | ||
|> Seq.tryPick (fun n -> if n.Name = "TargetRefPath" then Some n.Value else None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once we have the potential property, we can flow it through
/// ResolvedTargetPath is the path to the primary reference assembly for this project. | ||
/// For projects that produce ReferenceAssemblies, this is the path to the reference assembly. | ||
/// For other projects, this is the same as TargetPath. | ||
member x.ResolvedTargetPath = | ||
defaultArg x.TargetRefPath x.TargetPath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and we can make it easier for callers to get the correct field.
One question I had @TheAngryByrd - does the Adaptive LSP server use this library? or does it have a parallel mechanism? if so, I can replicate this in the FSAC codebase if you can point me in the right direction. |
Thanks for looking into this @baronfel . I wonder if we there is an existing MSBuild target that could be reused here to perform the standard logic - after all, MSBuild has to do the same logic to come up with compiler args. Unless TargetPath/TargetRefPath is as high level as we can get. |
Yeah it uses ProjInfo, ProjInfo.FCS, and ProjInfo.Sln. So this should flow through. I did turn off RefAssembly stuff that we'll probably need to turn on. It doesn't use |
d459c98
to
f43f28a
Compare
Technically we could call the |
Adds support for reading and deferring to TargetRefPath when it exists. This property points to the reference assembly that matches the implementation assembly that exists in
TargetPath
. There's a new member to help navigate the proper usage. When ref assemblies are present, the FSharpReferencedProject items returned as part of a generated FSharpProjectOptions object will use the ref assembly as the source of truth, not the implementation assembly.