Skip to content

ci: bump the package version in uv.lock on release - #43

Merged
kristoflemmens merged 1 commit into
mainfrom
ci/release-uv-lock
Oct 25, 2026
Merged

kristoflemmens merged 1 commit into
mainfrom
ci/release-uv-lock

Conversation

@kristoflemmens

@kristoflemmens kristoflemmens commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Refs #15

CI fails on the release PR #16: release-please bumps pyproject.toml to 0.1.0 but leaves uv.lock at 0.0.0, and uv sync --locked then refuses the lockfile. This would happen on every release.

This adds an extra-files entry to release-please-config.json, so release-please also bumps the thermia-genesis package version in uv.lock. It uses the TOML updater with $.package[?(@.name.value=='thermia-genesis')].version; release-please's TOML parser wraps values, hence .value.

Verification: this can't be run locally. After the merge, the release workflow rewrites #16, which must then also change uv.lock (version = "0.0.0" → "0.1.0" for thermia-genesis), and its CI must turn green.

Also, in the same release preparation: release-please could not parse the squash commit of #26 (feat: add the ThermiaGenesis API…). A wrapped body line starting with addresses: read as a footer, so the changelog left out the public API. #26 now has a commit override block (the release-please feature for this) in its description, and #16 lists it after a re-run.

Checklist

  • The test was written first and failed for the right reason before the implementation (n/a: release configuration)
  • Coverage stays at 100%
  • docs/design.md / CONTEXT.md updated if a design choice or domain term changed (n/a)
  • PR title follows Conventional Commits (feat:, fix:, docs:, ...)

🤖 Generated with Claude Code

release-please bumped pyproject.toml but left uv.lock at the old version,
so uv sync --locked failed on the release PR. Let it update the
thermia-genesis entry in uv.lock too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@kristoflemmens kristoflemmens left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed c0ec906 (only release-please-config.json; 61 files, the same as main). No concrete findings: the jsonpath is correct.

Version: release-please-action v5.0.0 (45996ed) depends on release-please ^17.6.0, locked at 17.6.0.

Source code (v17.6.0):

  • src/updaters/generic-toml.ts parses with parseWith() from src/util/toml-edit.ts. Its TaggedTOMLParser replaces every scalar value with a tagged object {start, end, value}, while tables and arrays stay ordinary objects.
  • So in a JSONPath filter, @.name is an object, and @.name.value is the string. That makes $.package[?(@.name.value=='thermia-genesis')].version the right form.
  • The result is resolved to a pointer (/package/<i>/version), and replaceTomlValue replaces only the byte range of that value, so the rest of the formatting stays intact.

Verified with the real updater: I installed release-please@17.6.0 in an isolated directory and ran GenericToml with this jsonpath and version 0.1.0 on uv.lock from main.

  • Result: exactly 1 line changes, line 1026, version = "0.0.0" → version = "0.1.0" in the [[package]] of thermia-genesis.
  • Unaffected: the references { name = "thermia-genesis", extra… } in the dependency groups stay as they are, because they don't sit directly under $.package.
  • Counter-check: without .value (@.name=='thermia-genesis'), the updater logs "No entries modified" and changes nothing. The .value is therefore required.

uv accepts the result: with pyproject.toml at 0.1.0, uv lock --check fails on the old lock, as on #16, and succeeds on the updated lock ("Resolved 49 packages"). uv sync --locked --dry-run then works.

@kristoflemmens
kristoflemmens merged commit d57cd1c into main Oct 25, 2026
11 checks passed
@kristoflemmens
kristoflemmens deleted the ci/release-uv-lock branch October 25, 2026 13:37
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