axodotdev / axodotdev/cargo-dist
check versions on packages early and explicitly
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 149
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 32
Description
```
ag_dubs@Ashleys-MBP-2 workerd % vi dist.toml
ag_dubs@Ashleys-MBP-2 workerd % cargo dist init
let's setup your cargo-dist config...
? looks like you deleted the cargo-dist-version key, add it back?
this is the version of cargo-dist your releases should use
✔ looks like you deleted the cargo-dist-version key, add it back?
this is the version of cargo-dist your releases should use
(you're currently running 0.21.1) · yes
✔ what platforms do you want to build for?
(select with arrow keys and space, submit with enter) · Apple Silicon macOS (aarch64-apple-darwin), Intel macOS (x86_64-apple-darwin), x64 Linux (x86_64-unknown-linux-gnu), x64 Windows (x86_64-pc-windows-msvc)
✔ enable Github CI and Releases? · yes
✔ what installers do you want to build?
(select with arrow keys and space, submit with enter) · shell, powershell, npm
✔ you've enabled npm support, please enter the @scope you want to use
this is the "namespace" the package will be published under
(leave blank to publish globally) · @cloudflare
✔ npm packages will be published under @cloudflare
? the npm installer requires binaries to be distributed as .tar.gz, is that ok?
otherwise we would distribute your binaries as .zip on windows, .tar.xz everywhere else
✔ the npm installer requires binaries to be distributed as .tar.gz, is that ok?
otherwise we would distribute your binaries as .zip on windows, .tar.xz everywhere else
(this is a hopefully temporary limitation of the npm installer's implementation) · yes
✔ Would you like to include an updater program with your binaries? · no
✔ added [dist] to your root dist.toml
✔ cargo-dist is setup!
running 'cargo dist generate' to apply any changes
WARN package.metadata.dist.cargo-dist-version is set, but this is only accepted in workspace.metadata (value is being ignored): /Users/ag_dubs/axo/workerd/dist.toml
WARN package.metadata.dist.ci is set, but this is only accepted in workspace.metadata (value is being ignored): /Users/ag_dubs/axo/workerd/dist.toml
× cargo dist panicked.
├─▶ at cargo-dist/src/announce.rs:655:45
╰─▶ called `Option::unwrap()` on a `None` value
help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
```
Contributor guide
Research direction
Start at cargo-dist/src/announce.rs:655 and reproduce the shown `cargo dist init` followed by `cargo dist generate` flow using the package metadata in dist.toml. Trace why the missing value reaches unwrap; done means package versions are checked early and explicitly instead of causing this panic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, release
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100