fix(release): make harmont-cli crates.io-publishable (or drop the dead channel) and fix install docs#129
Merged
Conversation
The release workflow advertised `cargo install harmont-cli` (README,
install.sh fallback, crates.io badge) but the publish chain could never
succeed:
- hm-vm carried `publish = false`, yet it is a hard dependency of both
hm-exec and harmont-cli. cargo refuses to publish a crate that depends
on an unpublishable one, so `cargo publish -p harmont-cli` (and
-p hm-exec) failed outright. (crates-io-1)
- release.yml never bumped or published hm-config, hm-render, or
hm-exec; harmont-cli pinned them at version 0.0.0-dev, which cannot
resolve on crates.io. (crates-io-2)
- With the chain broken, `cargo install harmont-cli` was a dead install
path. (cargo-install-3)
The infrastructure clearly intends crates.io distribution (badge, README,
install.sh, RELEASING.md, six existing publish steps), so this completes
the chain rather than dropping it:
- Drop `publish = false` from hm-vm and give it the required publish
metadata (repository + description).
- Stamp the tagged version into hm-config, hm-render, hm-vm, hm-exec and
rewrite their workspace.dependencies pins alongside the existing ones.
- Add ordered `cargo publish` steps for hm-config, hm-render, hm-vm,
hm-exec in dependency (topological) order before hm-plugin-cloud and
harmont-cli.
- Add a publishability guard: `cargo package --workspace` runs before any
real publish. It resolves sibling path deps locally (unlike
`cargo publish --dry-run`, which would fail on the not-yet-indexed
deps) and fails fast on the publish=false / unpublished-dep regression
class. Verified locally: it errors with hm-vm publish=false restored,
and packages all 10 crates once the fix is applied.
- Update RELEASING.md to describe the real (10-crate, topologically
ordered) chain and drop the stale `hm-plugin-sdk` reference.
`cargo install harmont-cli` is now a working path.
Fixes: crates-io-1, crates-io-2, cargo-install-3
…orkflow) The prose said the fail-fast guard runs `cargo publish -p harmont-cli --dry-run`, but release.yml uses `cargo package --workspace`. The latter is correct: it resolves sibling path deps locally, so it catches the publish=false / unpublished-dep regression class without the deps being on the index yet (which --dry-run requires). Align the doc with the implementation.
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.
Summary
The release workflow advertised
cargo install harmont-cli(crates.io badge inREADME.md, theinstall.shunsupported-platform fallback, andRELEASING.md) but the publish chain could never succeed. This PR completes the chain so the advertised crates.io install path actually works, rather than dropping the channel.hm-vmcarriedpublish = falseyet is a hard dependency of bothhm-execandharmont-cli. cargo refuses to publish a crate that depends on an unpublishable one, socargo publish -p harmont-cli(and-p hm-exec) failed outright.release.ymlnever bumped or publishedhm-config,hm-render, orhm-exec;harmont-clipinned them at0.0.0-dev, which cannot resolve on crates.io.cargo install harmont-cliwas a dead install path.What changed:
publish = falsefromhm-vm; add the requiredrepository+descriptionpublish metadata.hm-config,hm-render,hm-vm,hm-execand rewrite theirworkspace.dependenciespins alongside the existing ones.cargo publishsteps forhm-config,hm-render,hm-vm,hm-execin dependency (topological) order beforehm-plugin-cloudandharmont-cli.cargo package --workspaceruns before any real publish. It resolves sibling path deps locally (unlikecargo publish --dry-run, which would fail on the not-yet-indexed sibling deps) and fails fast on thepublish = false/ unpublished-dep regression class.RELEASING.mdto describe the real 10-crate topologically-ordered chain and drop the stalehm-plugin-sdkreference.A follow-up doc commit in this PR corrects one residual inaccuracy:
RELEASING.mdhad described the guard ascargo publish -p harmont-cli --dry-run, but the workflow usescargo package --workspace. The prose now matches the implementation.Findings addressed
crates-io-1—hm-vmwaspublish = falsewhile being a hard dep of publishable crates.crates-io-2—hm-config/hm-render/hm-execwere never versioned or published; pinned at0.0.0-dev.cargo-install-3—cargo install harmont-cliwas a dead install path.Verification evidence
The publishability guard was run locally against the full workspace (the exact command the workflow runs before any publish):
Result: all 10 publishable crates package cleanly, exit 0. The only warnings are
cargoexcludingtests/*.rsfrom the published packages, which is expected and benign.Other checks:
release.ymlworkspace.dependenciessed rewrites were replayed againstCargo.toml: every0.0.0-devpin is rewritten, none left behind (whitespace-exact match confirmed).hm-vm/Cargo.tomlnow carriesrepository.workspace = true+ adescription, satisfying crates.io's required-metadata check..github/workflows/release.ymlparses as valid YAML.Judge verdict
Approved. Implementer verification passed: true. No blocking issues.
Needs human review
This PR wires the crates.io release/publish chain. The
CRATES_IO_TOKENrepository secret is not set or modified here — only the workflow wiring that consumes it. A human must confirm the token exists with the correct scope (publish-newfor the first release, thenpublish-update) before tagging a release. The first real publish is the only end-to-end proof that crates.io accepts the chain; this PR proves the local packaging precondition only.Generated by the Harmont release-readiness workflow (automated; needs human review before merge). 🤖