From 472da2e8be02c83d42c2b8debe2335aa802b2992 Mon Sep 17 00:00:00 2001 From: Maksim Kramarenko Date: Fri, 29 May 2026 13:40:10 -0400 Subject: [PATCH] fix: switch release-please to simple type to support workspace inheritance The first release-please run failed: Error: release-please failed: path not found in object: package.version Root cause: release-type `rust` iterates every workspace member and writes a literal `package.version` into each (updaters/rust/cargo-toml.js unconditionally calls replaceTomlValue(['package','version'], ...)). examples/Cargo.toml has a [package] table but no version key, so the path walk throws. Worse, even on success the rust type (and the cargo-workspace plugin, which requires a literal string version) would clobber `version = { workspace = true }` in proxy and jito_protos with literals -- defeating workspace inheritance and creating recurring conflicts every time we sync upstream master. Fix: use release-type `simple`, which doesn't touch Cargo files, and drive the updates via extra-files (verified against release-please 17.6.1): - Cargo.toml [workspace.package] version via the generic annotation updater (x-release-please-version), preserving inheritance -- proxy/jito_protos are untouched. - Cargo.lock entries via two `toml` updaters keyed by package name. Note the jsonpath matches @.name.value (release-please's TOML parser wraps each scalar as {start,end,value}), e.g. $.package[?(@.name.value=='jito-shredstream-proxy')].version simple's version.txt updater is createIfMissing:false, so no version.txt is created. extra-files are merged for all strategies (strategies/base.js). Simulated both updaters on the real Cargo.toml/Cargo.lock -> 0.2.14+qn. Release-As: 0.2.14+qn Co-Authored-By: Claude Opus 4.8 (1M context) --- release-please-config.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/release-please-config.json b/release-please-config.json index 3257e1d1..2a44c486 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1,12 +1,13 @@ { "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", - "release-type": "rust", + "release-type": "simple", "include-component-in-tag": false, "packages": { ".": { - "component": "jito-shredstream-proxy", "extra-files": [ - { "type": "generic", "path": "Cargo.toml" } + { "type": "generic", "path": "Cargo.toml" }, + { "type": "toml", "path": "Cargo.lock", "jsonpath": "$.package[?(@.name.value=='jito-shredstream-proxy')].version" }, + { "type": "toml", "path": "Cargo.lock", "jsonpath": "$.package[?(@.name.value=='jito-protos')].version" } ] } }