-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
FIx build errors with live (SCI) runtime dependencies when targeting NetPrevious (net9.0) in source-build (VMR) #76486
base: main
Are you sure you want to change the base?
FIx build errors with live (SCI) runtime dependencies when targeting NetPrevious (net9.0) in source-build (VMR) #76486
Conversation
Why did this break? Why can't an immutable hash set be passed to a read only set? |
Given that this only happens in the source-build leg in the VMR (which uses the latest compiler and latest dependencies) I double checked whether the SBRP's Microsoft.NETCore.App.Ref/9.0.0 ref/System.Collections.Immutable.dll assembly has a wrong definition for Not sure what's going on here. |
Oh I see what's going on. This assembly reference is used: /__w/1/vmr/src/roslyn/artifacts/sb/package-cache/system.collections.immutable/10.0.0-alpha.1.24617.1/lib/netstandard2.0/System.Collections.Immutable.dll and so this branch is entered: https://github.com/dotnet/runtime/blob/237c7594967573e809db40b09dded0d4a6d98cec/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet_1.cs#L20 |
This is happening because of what was discussed in #76354. Roslyn builds the From what I see, this doesn't fail in the repo source-build leg because the runtime intermediate package isn't used and hence, dependencies don't get upgraded. |
826604a
to
c8355ff
Compare
Fixes the following two errors: - src/Features/Core/Portable/ExternalAccess/Watch/Api/WatchHotReloadService.cs(217,13): error CS1503: Argument 4: cannot convert from 'System.Collections.Immutable.ImmutableHashSet<Microsoft.CodeAnalysis.Project>' to 'System.Collections.Generic.IReadOnlySet<Microsoft.CodeAnalysis.Project>' [src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj::TargetFramework=net9.0] - src/roslyn/src/Features/Core/Portable/ExternalAccess/Watch/Api/WatchHotReloadService.cs(218,13): error CS1503: Argument 5: cannot convert from 'System.Collections.Immutable.ImmutableHashSet<Microsoft.CodeAnalysis.Project>' to 'System.Collections.Generic.IReadOnlySet<Microsoft.CodeAnalysis.Project>' [src/roslyn/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj::TargetFramework=net9.0] The underlying SDK being used is "10.0.100-alpha.1.24555.54"
c8355ff
to
7cb9fb4
Compare
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 think this change is digging the hole deeper. I think we need to go back to the previous fix and do as I suggested originally which is ahve that TFM be both NetCurrent and NetPrevious.
<PackageReference Include="System.Memory" Condition="'$(TargetFramework)' == 'netstandard2.0'" /> | ||
<PackageReference Include="System.Reflection.Metadata" /> | ||
<PackageReference Include="System.Reflection.Metadata" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" /> |
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.
Changes of this nature can't be merged unless we do a full VS validation insertion. This is too core of a change to go through without one.
I thought that's what we did? Maybe I misunderstood the original change. @jaredpar who would be a good person to drive that change? Btw how would that solve the above described issue? |
No it was changed to be
Once everything has a |
The issue here is that as long as you target |
Not sure what to do here then. Roslyn has built |
Nothing changed outside of roslyn. Runtime packages always only had |
@tmat, @jasonmalinowski you all will need to decide how to handle this. At the moment the workspace layer is using Overall we may want to just delete |
Unblocks dotnet/sdk#45427
Fixes the following two errors:
The underlying SDK being used is "10.0.100-alpha.1.24555.54"