fix(publish-crate): scope package-name sed to [package] section only#18
Merged
VrilLabs merged 2 commits intoJul 2, 2026
Merged
Conversation
The global sed substitution in the "Normalize crate package name" step was replacing every `name = "helios"` line in rs/helios/Cargo.toml, including the [lib] target name. Since the [package] name is already `vrillabs-helios`, the only line still matching was `[lib] name = "helios"`, which was wrongly renamed to `vrillabs-helios`. Per the official Cargo reference (cargo-targets.html): "library target names cannot contain hyphens" Cargo rejects the mangled manifest with that error, causing cargo set-version / cargo metadata to fail. Fix: use a sed address range (/^\[package\]/,/^\[/) to restrict the substitution to the [package] section, leaving the [lib] name (a valid Rust identifier) untouched.
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job 'Publish helios to crates.io'
fix(publish-crate): scope package-name sed to [package] section only
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Normalize crate package name" step used a global
sedsubstitution that matchedname = "helios"anywhere inrs/helios/Cargo.toml. Since the[package]name is alreadyvrillabs-helios, the only remaining match was the[lib]target name — corrupting it tovrillabs-helios, which Cargo rejects: library target names cannot contain hyphens (cargo-targets reference).Change
Scope the substitution to the
[package]TOML section via a sed address range:The range
/^\[package\]/,/^\[/limits the substitution to lines between the[package]header and the next section header, leaving[lib] name = "helios"(a valid Rust identifier) untouched. The step remains a no-op for current tags and still correctly patches old tags where the package was namedheliosbefore the crates.io rename.