axodotdev / axodotdev/cargo-dist
Unable to parse the version number in a multi-package workspace if a package includes a `v`
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 149
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 32
Description
I've got [a project](https://github.com/Michael-F-Bryan/wit-lsp) with multiple different components, `wit-language-server`, `tree-sitter-wit`, `wit-compiler`, and `vscode-plugin`. When I'm ready to cut a release, I'll merge a Release PR (in this case, https://github.com/Michael-F-Bryan/wit-lsp/pull/2) and [Release Please](https://github.com/googleapis/release-please) will automatically update the changelog, create tags, and create a GitHub Release for each component being released.
From there, I'm using `cargo-dist` to make a nice bundle and installer for the `wit-language-server` binary.
The "plan" step for my Release workflow just failed ([build logs](https://github.com/Michael-F-Bryan/wit-lsp/actions/runs/8647272333/job/23708354557)) with the following:
```
× Couldn't parse the version from the provided announcement tag (vscode-plugin-v1.1.0)
╰─▶ unexpected character 's' while parsing major version number
```
I assume this is just an issue where we do `tag.split_once('v')` to extract the version number when we should actually be using `tag.rsplit_once()`.
Contributor guide
Research direction
Start by tracing the version-parsing path used during the workflow's "plan" step and reproduce it with the announcement tag `vscode-plugin-v1.1.0`. Done means the multi-package tag is accepted and its version is parsed correctly without breaking other announcement tags.
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
- 42/100