feat(ci): publish plugin SDK to crates.io as a renamed chain#95
Draft
raphaelvigee wants to merge 1 commit into
Draft
feat(ci): publish plugin SDK to crates.io as a renamed chain#95raphaelvigee wants to merge 1 commit into
raphaelvigee wants to merge 1 commit into
Conversation
Third-party plugin authors integrate against `plugin-sdk` (the transport- agnostic Provider/Driver author surface). To make it consumable, ship it and its dependency closure to crates.io. crates.io cannot vendor path deps, and a single-crate flatten is blocked by the `htspec-derive` proc-macro (it's public API — authors derive `Spec`/`SpecEnum` on their own config types, so it must run in the author's build). So publish the closure as a renamed `heph-*` chain (the bare names core/model/plugin are taken/reserved). - Drop the dead `walk` dependency from `plugin` (only the crate's own `fn walk` matched; `WalkEntry` comes from `hcore::hartifactcontent`). Removes the rusqlite/r2d2/wax tail from the publish surface. - scripts/publish: stage the publish set into an isolated virtual workspace, rewrite manifests (rename -> heph-*, inject version + crates.io metadata, add version reqs to intra-set path deps), then publish in topological order. - .github/workflows/publish-crates.yml: tag pushes publish; manual dispatch defaults to a dry run (compiles the renamed chain; uploads are exercised only on a real sequential publish, since each crate must reach the index before the next resolves). - License the repo and the published crates under AGPL-3.0-only; add LICENSE.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Makes
plugin-sdk— the transport-agnostic Provider/Driver author surface — publishable to crates.io so third-party developers can write their own heph plugins.Why the renamed-chain approach
crates.io cannot vendor path deps; every dependency must resolve from the registry. A single self-contained crate (true "vendoring") is blocked by
htspec-derive, a proc-macro that is part of the public API — authors apply#[derive(Spec)]/SpecEnumto their own config structs (seeplugin-go/driver_*.rs), so it must run at the author's build and cannot be pre-expanded or merged into a lib crate.So the closure ships as a renamed
heph-*chain (the bare namescore/model/pluginare taken/reserved on crates.io).Surface reduction
walkdependency fromplugin— only the crate's ownfn walkmethod matched the grep;WalkEntry/WalkEntryKindcome fromhcore::hartifactcontent. Removing it drops therusqlite/r2d2/wax/glob/borshtail off the publish surface entirely.Publish set (topological):
heph-core,heph-model,heph-htspec-derive,heph-proto-gen,heph-plugin,heph-driver-support,heph-plugin-abi,heph-plugin-stabby,heph-plugin-sdk.How
scripts/publish/— stages the publish set into an isolated virtual workspace (sidesteps rewriting non-publish members), rewrites manifests (rename →heph-*, inject version + crates.io metadata, add version reqs to intra-set path deps), validates withcargo metadata, then publishes in dependency order.cargo publishblocks on the index between crates so each dependent resolves..github/workflows/publish-crates.yml— tag pushes (v*) publish for real; manual dispatch defaults to a dry run that compiles the full renamed chain. (Per-crate--dry-runcan only validate leaves, since a dependent'sheph-*deps aren't on the registry yet; the real sequential publish works because each crate hits the index before the next builds.)CRATES_IO_TOKENrepo secret.Licensing
Repo and published crates licensed AGPL-3.0-only; adds
LICENSE.md(verbatim AGPL-3.0 text) andlicense/repositoryon the root manifest.Validation
walkremoval:plugin,plugin-sdk, and the full stabby tier build clean../scripts/publish/publish-crates.sh <ver> --dry-runstages, rewrites, and compiles the renamed chain end-to-end locally; leaf crates also passcargo publish --dry-run(packaging incl. generated proto sources confirmed).🤖 Generated with Claude Code