Skip to content

[leancode_force_update] Upgrade contracts dependencies - #559

Merged
PiotrRogulski merged 4 commits into
masterfrom
claude/upgrade-contracts-dependencies-wwj8av
Aug 10, 2026
Merged

PiotrRogulski merged 4 commits into
masterfrom
claude/upgrade-contracts-dependencies-wwj8av

Conversation

@PiotrRogulski

Copy link
Copy Markdown
Member

Upgrades the contracts toolchain in leancode_force_update and regenerates the contracts.

Changes

  • leancode_contracts ^0.9.0 → ^0.10.0
  • leancode_contracts_generator ^0.18.0 → ^0.19.0
  • dotnet-contracts-generate (.config/dotnet-tools.json) 4.0.0 → 4.1.0
  • leancode_lint ^17.0.0 → ^19.0.0 — forced by the above: lint 17/18 pin analyzer ^7.3.0 while the new generator needs analyzer >=8.1.1, so version solving failed otherwise. 19.0.x is the lowest version that resolves while keeping the package's sdk: >=3.10.0 floor (lint ≥20 would require bumping the SDK/Flutter constraints and the CI matrix).
  • Dropped the json_serializable dev dependency — generator v0.19.0 generates serialization with its own contracts_serializable builder, so the json_serializable builder had become a no-op here. It remains in the lockfile as a transitive dependency of the generator. build_runner stays, since it drives the new builder.
  • Version bumped to 1.0.4-alpha (1.0.3-alpha is already published), with a CHANGELOG entry.

Leancode.ForceUpdate.Contracts is left at 10.0.2860 — already the newest published version.

Regenerated output

contracts.dart is unchanged. The only change in contracts.g.dart is the generator header:

-// JsonSerializableGenerator
+// ContractsSerializableGenerator

The fromJson/toJson bodies are byte-identical, both across the generator upgrade and across the dotnet-contracts-generate bump.

Verification

Ran locally against Flutter 3.44.9 stable and .NET SDK 8:

  • Confirmed the pre-upgrade toolchain reproduced the committed generated files byte-for-byte before changing anything, to validate the setup.
  • flutter analyze — no issues
  • flutter test — 8/8 passing
  • flutter pub publish --dry-run — clean apart from the usual "not an incremental update" hint that the -alpha versioning scheme has always produced

Generated by Claude Code

claude added 4 commits August 9, 2026 10:27
Bump `leancode_contracts` to `^0.10.0` and `leancode_contracts_generator`
to `^0.19.0`, which moves serialization generation from
`json_serializable` to the generator's own `contracts_serializable`
builder. `leancode_lint` has to go up to `^19.0.0` as well, since the new
generator requires `analyzer` v8+.

Also bump the `dotnet-contracts-generate` tool to `4.1.0` and regenerate
the contracts — the only change in the output is the generator header in
`contracts.g.dart`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CwSEMS3JeqqcupWaZcS18h
Since `leancode_contracts_generator` v0.19.0 generates serialization with
its own builder, the `json_serializable` builder is a no-op here.
Regenerating without it leaves `contracts.g.dart` unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CwSEMS3JeqqcupWaZcS18h
@github-actions github-actions Bot added the p: leancode_force_update Related to the leancode_force_update package label Aug 9, 2026
@PiotrRogulski
PiotrRogulski marked this pull request as ready for review August 9, 2026 10:51
@PiotrRogulski

Copy link
Copy Markdown
Member Author

pana reports 150/160 because we don't support in_app_update 5.0.0 — I'll upgrade it in a separate PR

@PiotrRogulski
PiotrRogulski merged commit 20342c7 into master Aug 10, 2026
4 of 5 checks passed
@PiotrRogulski
PiotrRogulski deleted the claude/upgrade-contracts-dependencies-wwj8av branch August 10, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p: leancode_force_update Related to the leancode_force_update package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants