Skip to content

chore(text.json): [Obsolete] remaining Newtonsoft surface + migrate SignPathTasks (#83) - #170

Merged
ChrisonSimtian merged 1 commit into
mainfrom
feature/83-obsolete-newtonsoft-helpers
May 24, 2026
Merged

chore(text.json): [Obsolete] remaining Newtonsoft surface + migrate SignPathTasks (#83)#170
ChrisonSimtian merged 1 commit into
mainfrom
feature/83-obsolete-newtonsoft-helpers

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Summary

Originally scoped as a dead-code sweep — turned into a sweep + v11-marking PR after verification showed every candidate type has internal callers that need either migration or pragma suppression.

What's marked [Obsolete] for v11 removal

Public surface in Fallout.Utilities.Text.Json:

After this PR, every Newtonsoft-typed surface in Fallout.Utilities.Text.Json is [Obsolete]. The STJ overloads from #166 + the JsonObject helpers from #169 are the unmarked path forward.

Migrations

  • Fallout.Common.Tools.SignPath.SignPathTasks.cs — fully migrated to STJ. Drops using Newtonsoft.Json.Linq;. Lines 75 (.ToJson() body content) and 152-156 (.GetJson() + JToken.Value<string>() property reads) now use JsonExtensions.DefaultSerializerOptions / .GetJsonObject() / JsonNode.GetValue<T>().

Pragma suppressions (with TODO pointing at the v11 cutover)

Each is part of a separate workstream that should ultimately remove the suppression:

File Why suppressed
src/Fallout.Common/CI/GitHubActions/GitHubActions.cs:117-118 PullRequestNumber/Action use JObjectExtensions on the public JObject GitHubEvent property. Migrating the property is a breaking API change scheduled for v11.
src/Fallout.Tooling/ProcessExtensions.cs:55 StdToJson<T> delegates to GetJson<T>(Newtonsoft). Part of the Fallout.Tooling migration follow-up.
tests/Fallout.Common.Tests/SettingsTest.cs Discord test pins Newtonsoft round-trip.
tests/Fallout.Tooling.Tests/OptionsTest.cs:150 Pins Options.JsonSerializerSettings round-trip.
tests/Fallout.Tooling.Tests/ToolOptionsArgumentsTest.cs:194 ToJObject writes into JObject-typed InternalOptions (part of the Tooling migration).
tests/Fallout.Utilities.Tests/Text/SerializationTest.cs:23-24 Pins Newtonsoft serialization round-trip.

Shim project NoWarn

src/Shims/Nuke.Common/Nuke.Common.csproj adds CS0618 to NoWarn. The TransitionShimGenerator auto-emits delegations to canonical methods; when those methods are [Obsolete], the auto-generated shim body produces CS0618. Consumers calling the canonical type directly still see [Obsolete] guidance; this NoWarn just keeps the shim project's own build clean. Propagating [Obsolete] semantics through the generator is a v11 follow-up.

Verification

  • dotnet build fallout.slnx — 0 errors across whole solution
  • dotnet test tests/Fallout.SourceGenerators.Tests/Fallout.SourceGenerators.Tests.csproj — 6/6 pass
  • No leftover unsuppressed CS0618 warnings

Test plan

  • CI green
  • External consumer of Nuke.Common (via the shim) sees no new warnings
  • Consumer calling Fallout.Common.Utilities.JObjectExtensions.GetChildren directly sees the new [Obsolete] warning pointing at the v11 cutover

🤖 Generated with Claude Code

…ignPathTasks (#83)

Marks the last Newtonsoft-typed types in Fallout.Utilities.Text.Json [Obsolete]
for v11 removal, migrates the only viable internal call site (SignPathTasks),
and wraps the rest with #pragma + v11 TODO.

[Obsolete] additions:
- JObjectExtensions.GetChildren<T>, GetChildren, GetPropertyValueOrNull<T>,
  GetPropertyValue<T>, GetPropertyValue, GetPropertyStringValue
- JsonObjectExtensions.ToJObject (the renamed ObjectExtensions class)
- AllWritableContractResolver (internal class)
- Base64JsonConverter<T> (zero internal callers)
- JsonExtensions.DefaultSerializerSettings (the Newtonsoft settings field)

Migrations:
- src/Fallout.Common/Tools/SignPath/SignPathTasks.cs — fully migrated to STJ.
  Lines 75 (.ToJson()) and 152-156 (.GetJson() + JToken.Value<string>()) now
  use JsonExtensions.DefaultSerializerOptions / .GetJsonObject() / .GetValue<>().
  Drops `using Newtonsoft.Json.Linq;` entirely.

Pragma suppressions for now (separate workstreams will retire each):
- src/Fallout.Common/CI/GitHubActions/GitHubActions.cs:117-118 — PullRequestNumber/
  Action use JObjectExtensions on the public JObject GitHubEvent property. The
  GitHubEvent migration is a public API break, scheduled for v11.
- src/Fallout.Tooling/ProcessExtensions.cs:55 — StdToJson<T> delegates to
  Newtonsoft GetJson; part of the Fallout.Tooling #83 sweep.
- tests/Fallout.Common.Tests/SettingsTest.cs:174 — Discord test pins
  Newtonsoft round-trip.
- tests/Fallout.Tooling.Tests/OptionsTest.cs:150 — pins
  Options.JsonSerializerSettings round-trip.
- tests/Fallout.Tooling.Tests/ToolOptionsArgumentsTest.cs:194 — uses ToJObject
  which writes into JObject-typed InternalOptions.
- tests/Fallout.Utilities.Tests/Text/SerializationTest.cs:23-24 — pins
  Newtonsoft serialization round-trip.

Shim project (src/Shims/Nuke.Common/Nuke.Common.csproj) adds CS0618 to NoWarn:
the TransitionShimGenerator auto-emits delegations to canonical methods and
propagates [Obsolete] warnings into those auto-generated shim bodies. Consumers
calling the canonical type directly still see [Obsolete] guidance; this NoWarn
keeps the shim project's build clean. Propagating [Obsolete] through the
generator is a v11 follow-up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ChrisonSimtian
ChrisonSimtian merged commit 44770a6 into main May 24, 2026
1 check passed
@ChrisonSimtian
ChrisonSimtian deleted the feature/83-obsolete-newtonsoft-helpers branch May 24, 2026 23:08
ChrisonSimtian added a commit that referenced this pull request May 29, 2026
Wires release/v10.3's release workflow to fire on push to the branch
(was push:main, which never triggers here) plus manual dispatch, and
binds it to the nuget-org Environment so the env-scoped NUGET_API_KEY
(#273) resolves and the required-reviewer approval gate runs before any
nuget.org push.

Merging this PR is the inaugural release-from-release/vN run: it builds
the clean #170 code as the stable 10.3.48 marker and publishes it.

Keeps the #170-era './build.cmd Test Pack Publish' invocation (local
'dotnet fallout' tool didn't exist until #204, after this branch point).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ChrisonSimtian added a commit that referenced this pull request May 29, 2026
* chore(release): stage clean 10.3.48 marker on release/v10.3

release/v10.3 is parked at the last clean commit (#170 == git-height 23,
i.e. 10.3.23 code). The contaminated 10.3.24-47 patches are being
unlisted from nuget.org. This stages a fresh CLEAN marker above them:

- versionHeightOffset: 24  -> height 24 (this commit) + 24 = patch 48
- publicReleaseRefSpec gains ^refs/heads/release/v10.3$ so a build ON
  release/v10.3 is a STABLE public release (10.3.48), not a -preview.

No publish here. The actual 10.3.48 push to nuget.org is a separate
operation with a push-scoped key.

VERIFY before publishing: 'nbgv get-version' on release/v10.3 must
report 10.3.48 (NOT 10.3.25 — which would mean the offset reset height
and collide with a contaminated version).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* ci(release): publish the 10.3.x channel from release/v10.3 on merge

Wires release/v10.3's release workflow to fire on push to the branch
(was push:main, which never triggers here) plus manual dispatch, and
binds it to the nuget-org Environment so the env-scoped NUGET_API_KEY
(#273) resolves and the required-reviewer approval gate runs before any
nuget.org push.

Merging this PR is the inaugural release-from-release/vN run: it builds
the clean #170 code as the stable 10.3.48 marker and publishes it.

Keeps the #170-era './build.cmd Test Pack Publish' invocation (local
'dotnet fallout' tool didn't exist until #204, after this branch point).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ChrisonSimtian added a commit that referenced this pull request May 29, 2026
…4-47) (#294)

The original unlist-10.3.40-47.json (#224) only covered the 10.3.40-47
tail and missed 10.3.24-39 — including the entire System.Text.Json
breaking migration (ef83796, #171), which is patch zero of the
contamination.

Adds unlist-10.3.24-47.json: the complete 256-entry batch covering
every published 10.3.x >= 10.3.24 across all 18 package IDs. Boundary
is exact — 10.3.23 (commit 44770a6, #170) is the last clean patch and
is where release/v10.3 is now parked.

Keeps the old 40-47 file as the historical record of what was first
identified; README documents both and the boundary.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant