Fix publish workflow
- Lingua principale
- TypeScript
- Stelle
- 1
- Fork
- 21
- Merge medio
- 12h 14m
- PR unite (30g)
- 41
Descrizione
The `0.15.0` crate-publish workflow [failed](https://github.com/0xMiden/web-sdk/actions/runs/27447585778) because `miden-client-web` depends on `js-export-macro` through a path dependency without a version requirement. `cargo publish` rejects that: published crates must declare a version for every dependency. We recovered by publishing manually, but the workflow still needs to be fixed before the next release.
It's worth noting that even if Rust crates fail to publish, the NPM package can succeed (which happened this time), because it builds artifacts and publishes them separately (ie, they don't depend on crates being in crates.io).
There was anoter issue: `js-export-macro` was not included in `publish-crates-release.yml`. The workflow only published `idxdb-store`, `web-client`, and `mobile-prover`, even though `web-client` depends on `js-export-macro`. Since the job failed at `web-client`, it never reached `mobile-prover`, which is why `miden-mobile-prover` is still at `0.14.11` while the other crates are already at `0.15.0`.
Action items:
- Add `js-export-macro` to `[workspace.dependencies]` with a version:
```toml
js-export-macro = { path = "crates/js-export-macro", version = "0.15.0" }
```
- Change `web-client` to use the workspace dependency:
```toml
js-export-macro = { workspace = true }
```
- Replace the hand-ordered publish steps with workspace publishing (`cargo publish --workspace`). Same for the dry run step.
- Add a README to `js-export-macro` and set `readme = "README.md"` in its `Cargo.toml`.
- Decide whether `miden-mobile-prover` should be part of the publish process (and potentially backfill it for 0.15)
- Keep in mind that version strings in `[workspace.dependencies]` are hand-maintained, so release bumps need to update both `idxdb-store` and `js-export-macro`.
- As part of this we probably want to also make the [publishes idempotent](https://github.com/0xMiden/miden-client/issues/2259)
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Examine the publish-crates-release.yml workflow file and the Cargo.toml files for the workspace and the crates (idxdb-store, web-client, mobile-prover, js-export-macro). Start by adding js-export-macro to workspace.dependencies with version 0.15.0 and updating web-client's dependency. Test with a dry run of cargo publish --workspace. Check if miden-mobile-prover should be added to the workflow and consider idempotent publish steps as referenced in the linked issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust, typescript
- Ambito
- build-system, ci-cd, release
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 65/100