-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Removing default ProduceReferenceAssembly value for F# #26306
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
Removing default ProduceReferenceAssembly value for F# #26306
Conversation
|
We can't take this in main, because the version of F# referenced in this repo hasn't advanced to the point where that is available. I think F# is doing codeflow from the 17.3 branch into the release/6.0.4xx branch here, and that branch is good to go. Mind retargeting this PR to that branch? You can check the fsharp commit used in the eng/Versions.Details.props file in this repo. |
187ed47 to
b54c80a
Compare
|
@baronfel I've rebased my branch on |
bc17c7c to
8a44404
Compare
|
@baronfel I've confirmed that locally it works fine and the Does it mean that we need to wait for newer release of Visual Studio before we can merge this PR? |
|
I think so - specifically that the F# team inserts a version of their tools that is compatible with this into VS previews. @vzarytovskii do you have any insight into that schedule? |
I try competing insertions every day, i can't look into the error now, we have public holidays today and tomorrow. I will take a look at it later this week. |
|
I'm not entirely sure I understand the error fully. @marcin-krystianc can you please help me here - does the test try to produce refassembly and then doesn't find it on disk? What version of sdk/vs does it use? It may not include needed FSharp.Build/compiler changes yet. |
The test simply tries to build an F# app. After my change, the From my undressing from the logs, the problem is because the test pipeline uses VS version that predates the dotnet/fsharp#13263. But I don't know where to check for the version of VS being used in these tests. |
Yep, this is a likely cause. It was merged to the 17.3 by now, and should be in the next preview. |
|
@vzarytovskii @baronfel looking at https://docs.microsoft.com/en-us/visualstudio/releases/2022/release-notes-preview,there appears to be a preview release on June 14th. As dotnet/fsharp#13263 was merged on June 9th, would that 17.3 preview 2 contain what we need? If so, how can we help? |
It may not have it, since the "freeze" is usually a bit earlier than the preview releases. |
|
Hey @marcin-krystianc, could you retarget this PR to the |
f5d3196 to
238acd3
Compare
Done. |
|
From the logs, I can conclude that the failing tests run on Does anyone knows whether it is possible to install the "preview 2" version to check the |
@MattGal @marcpopMSFT for updating the VS preview used for helix images. |
Just for clarification, yesterday this queue was taken from 17.3.0-preview 1.1 to preview 2. After approximately two weeks this will be bumped to the version currently in "Scouting", preview 4. I will send you offline a repo to check commit history for where to get the standalone installers. |
|
Discussed with @dsplaisted , we have a DevTest Lab setup for repro VMs if you want to investigate, no older installers required. Ping me on Teams if you need this. |
|
Hello @dsplaisted and @MattGal, is there any news of the update of the Visual Studio Preview on the Helix image? |
|
Hi @MattGal, yes I think we are there. |
Probably? I'm only here for build and test infrastructure concerns, I'd defer to @marcpopMSFT for questions about what commits can go into SDK release branches. |
|
@nojaf this is too late for rc1, we're very far past code freeze at this point. This should be retargeted to |
fd99c55 to
0c2e206
Compare
Done |
|
Is there any concern that this could break projects (most likely with custom MSBuild logic) that weren't expecting reference assemblies to be enabled? For C#, we only enabled reference assemblies for .NET 5 and up, so that it would only affect new or retargeted projects. |
|
@marcin-krystianc I chatted with @vzarytovskii about @dsplaisted's concern and we agree that this should be gated by a TFM upgrade on the user's part. You should be able to follow the pattern done for this property previously, checking for 7.0 instead of 5.0. |
Sure, I will do that. Doesn't it mean though, that for |
|
I think that's correct, based on my reading and based on a sample binlog I just made. I think library authors that want a ref assembly are just used to turning it on explicitly via property. We should align with that precedent. |
|
Library authors shouldn't necessarily be targeting .NET Standard, especially as time goes on: https://devblogs.microsoft.com/dotnet/the-future-of-net-standard/#what-you-should-target |
Hmm, actually it is quite complicated. I cannot follow the same pattern in the Maybe we need to update |
|
That seems reasonable to me, thanks for the explanation. |
Ok, I've implemented it following my previous description. |
| <PropertyGroup> | ||
| <ProduceReferenceAssembly Condition="'$(ProduceReferenceAssembly)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0)) and ('$(ProduceOnlyReferenceAssembly)' != 'true')" >true</ProduceReferenceAssembly> | ||
| <ProduceReferenceAssembly Condition="'$(ProduceReferenceAssembly)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0)) and ('$(ProduceOnlyReferenceAssembly)' != 'true') and '$(MSBuildProjectExtension)' != '.fsproj'" >true</ProduceReferenceAssembly> | ||
| <ProduceReferenceAssembly Condition="'$(ProduceReferenceAssembly)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 7.0)) and ('$(ProduceOnlyReferenceAssembly)' != 'true') and '$(MSBuildProjectExtension)' == '.fsproj'" >true</ProduceReferenceAssembly> |
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.
I wish we didn't have to use .fsproj as the comparison here. I was going to suggest using $(Language) instead, but that's not set until Microsoft.FSharp.targets, well after this file is imported.
|
@marcin-krystianc when you get a moment, adding a test around this would be really nice - we have several that do evaluations around these sorts of props, and it would be a nice backstop. |
Sure, will give it a try. |
Generation of reference assemblies for F# was disabled previously (#13085) because the F# compiler didn't support them.
Now both, the F# compiler (dotnet/fsharp#12334) and the FCS task (dotnet/fsharp#13263) support reference assemblies. Also, the bug around the copying of F# ref assemblies was fixed (dotnet/fsharp#13266) so I think it is time to enable the generation of ref assemblies for F#.