Skip to content
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

Clean up STJ references Fixes #39902 #40645

Draft
wants to merge 11 commits into
base: release/8.0.4xx
Choose a base branch
from

Conversation

Forgind
Copy link
Member

@Forgind Forgind commented May 2, 2024

Fixes #39902

First commit removes references to S.T.J that shouldn't be necessary because we have our own "WorkloadManifestReader.SystemTextJson" class.

The second commit forces all our package versions to 8.0.0.

I was a bit confused with this logic:
<UseSystemTextJson Condition="'$(TargetFramework)'!='netstandard2.0' And '$(TargetFramework)'!='net472'">True</UseSystemTextJson>

This seems to say that we should use System.Text.Json on core only

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels May 2, 2024
@Forgind Forgind changed the title Clean up STJ references Clean up STJ references Fixes #39902 May 2, 2024
@@ -91,7 +91,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Include="System.Text.Json" VersionOverride="8.0.0" />
<PackageReference Include="System.Text.Json" VersionOverride="$(SystemTextJsonPackageVersion)" Condition="'$(TargetFramework)' == 'net472'"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate condition (previous line covered it)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just confused why things aren't working the way I'd expect, so I was adding some duplication in case I had missed something, and it didn't work as I'd thought.

@@ -78,7 +78,7 @@
<SystemSecurityCryptographyXmlPackageVersion>8.0.0</SystemSecurityCryptographyXmlPackageVersion>
<SystemSecurityPermissionsPackageVersion>8.0.0</SystemSecurityPermissionsPackageVersion>
<SystemServiceProcessServiceControllerVersion>8.0.0</SystemServiceProcessServiceControllerVersion>
<SystemTextJsonPackageVersion>8.0.2</SystemTextJsonPackageVersion>
<SystemTextJsonPackageVersion>8.0.0</SystemTextJsonPackageVersion>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property is used in directory.packages.props so what you're doing here is actually overriding the version used by transitive pinning (so overriding the version for all implicit .net core references). You'll need a separate property to use for pinning to 8.0.0 and let the d.p.props version float to current. Runtime does this too if you see here: https://github.com/dotnet/runtime/blob/main/eng/Versions.props#L137

FYI, I talked to Eric and I'll be prepping a change for 8.0.1xx and 8.0.3xx for how we handle STJ. We'll want that change in 8.0.4xx as well. It depends on a change in runtime so you won't be able to get this PR working in 4xx as it turns out. You should be able to retarget to main, make the above change, apply my changes, and get it sorted out. I'll talk to you offline as it's complicated as there are actually 3 different classes of STJ references, not 2 like I thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants