Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo install wadm - the '--version' provided, 'v0.4.0-alpha.1', is not a valid semver version #97

Closed
voigt opened this issue Apr 19, 2023 · 9 comments

Comments

@voigt
Copy link

voigt commented Apr 19, 2023

Heyho,

super excited to see wadm taking shape, so I tried to follow install instructions on my M2. Unfortunately there seems to be an issue with semver detection of cargo for v0.4.0-alpha.1.

Trying to run the command from the readme:

$ cargo install wadm --bin wadm --features cli --git https://github.com/wasmcloud/wadm --version v0.4.0-alpha.1 --force
error: the `--version` provided, `v0.4.0-alpha.1`, is not a valid semver version: cannot parse 'v0.4.0-alpha.1' as a semver
$ cargo version
cargo 1.68.2 (6feb7c9cf 2023-03-26)

For now I was able to work around it via leaving out the --version flag.

$ cargo install wadm --bin wadm --features cli --git https://github.com/wasmcloud/wadm --force
[...]
Installed package `wadm v0.4.0-alpha.1 (https://github.com/wasmcloud/wadm#a08761c6)` (executable `wadm`)
$ wadm --version
wadm 0.4.0-alpha.1

Thank you and keep up the great work!

@andar1an
Copy link
Contributor

andar1an commented Apr 19, 2023

Also noticed that crate failed to publish in worflow run here:
https://github.com/wasmCloud/wadm/actions/runs/4727114137/jobs/8387564660

Not sure how that wadm version is being installed haha, I don't find crate: https://crates.io/search?q=wadm

-> Didn't notice git flag haha

@voigt
Copy link
Author

voigt commented Apr 19, 2023

Tried to reproduce on an Ubuntu-22-04 VM via parallels, but same issue.

Btw, uninstalling wadm (after installing it without specifying the version) implies that it indeed doesn't like the .:

$ cargo uninstall wadm v0.4.0-alpha.1
    Removing /Users/c.voigt/.cargo/bin/wadm
error: invalid package ID specification: `v0.4.0-alpha.1`

Caused by:
  invalid character `.` in pkgid: `v0.4.0-alpha.1`, characters must be Unicode XID characters (numbers, `-`, `_`, or most letters)
     Summary Successfully uninstalled wadm! Failed to uninstall v0.4.0-alpha.1 (see error(s) above).
error: some packages failed to uninstall

@voigt voigt changed the title cargo install wadm - the --version provided, v0.4.0-alpha.1, is not a valid semver version cargo install wadm - the \--version\ provided, \v0.4.0-alpha.1\, is not a valid semver version Apr 19, 2023
@voigt voigt changed the title cargo install wadm - the \--version\ provided, \v0.4.0-alpha.1\, is not a valid semver version cargo install wadm - the --version provided, v0.4.0-alpha.1, is not a valid semver version Apr 19, 2023
@andar1an
Copy link
Contributor

were you able to drop the .1 to uninstall?

@voigt voigt changed the title cargo install wadm - the --version provided, v0.4.0-alpha.1, is not a valid semver version cargo install wadm - the '--version' provided, 'v0.4.0-alpha.1', is not a valid semver version Apr 19, 2023
@voigt
Copy link
Author

voigt commented Apr 19, 2023

I didn't have to:

$ wadm git:(main) which wadm
/Users/c.voigt/.cargo/bin/wadm
$ wadm git:(main) wadm --version
wadm 0.4.0-alpha.1
$ wadm git:(main) cargo uninstall wadm v0.4.0-alpha.1
    Removing /Users/c.voigt/.cargo/bin/wadm
error: invalid package ID specification: `v0.4.0-alpha.1`

Caused by:
  invalid character `.` in pkgid: `v0.4.0-alpha.1`, characters must be Unicode XID characters (numbers, `-`, `_`, or most letters)
     Summary Successfully uninstalled wadm! Failed to uninstall v0.4.0-alpha.1 (see error(s) above).
error: some packages failed to uninstall
$ wadm git:(main) ll /Users/c.voigt/.cargo/bin/wadm
ls: /Users/c.voigt/.cargo/bin/wadm: No such file or directory

@andar1an
Copy link
Contributor

I need to read full messages lmao. I skim too much

@andar1an
Copy link
Contributor

andar1an commented Apr 19, 2023

Cargo uses semver for versioning, with a major.minor.patch-pre format:

major: Incompatible API changes
minor: Added functionality in backwards compatible manner
patch: Backwards compatible bug fixes
pre: Pre-release version tag (omitted for normal releases)

So dk why alpha doesn't work, maybe it is the .1 as you noticed.

@thomastaylor312
Copy link
Contributor

As far as I can tell from the semver spec dots are entirely allowed in prerelease identifiers

@thomastaylor312
Copy link
Contributor

We're updating install instructions though to just download the binary, so this shouldn't be a problem

@brooksmtownsend
Copy link
Member

Definitely fixed by updating the README, but in case you want to do it, this works!

cargo install wadm --version 0.4.0-alpha.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants