The sound distributed version control system

#591 Cannot compile pijul from cargo: large number of errors

Closed on January 1, 2022
quickdudley on December 13, 2021

To replicate: run cargo install pijul --version "~1.0.0-alpha"

Expected results: a recent version of pijul installed

Actual results: several hundred errors. At least a hundred uses of the attribute clap without it being in scope, at least 50 functions called with the wrong number of arguments, and a few calls to nonexistent functions.

tankf33der on December 13, 2021

What is your version of rust environment?

tankf33der closed this discussion on December 13, 2021
tankf33der on December 13, 2021

I belive you should update rust first.

tankf33der reopened this discussion on December 13, 2021
quickdudley on December 13, 2021

I was on rustc 1.58.0-nightly (b416e3892 2021-11-13), but updating to rustc 1.59.0-nightly (6bda5b331 2021-12-12) has no effect on this issue.

tankf33der on December 13, 2021

Yeah, clap again.

Try to downgrade to stable 1.57 and try again.

quickdudley on December 13, 2021

Same with 1.57.

quickdudley on December 13, 2021

I used this procedure to get the current version from nest running on my computer:

  1. Use cargo-download to download pijul 1.0.0-alpha.56 and unpack it with tar
  2. Edit Cargo.toml and change the clap version to 3.0.0-rc.4
  3. cargo build (strangely: the build issue reoccurs if I attempt a release build)
  4. Use ./target/debug/pijul to clone pijul from nest
  5. cd pijul/pijul; cargo install --path . --features=default,git

Leaving open for now as this is quite a complicated workaround.

tankf33der on December 14, 2021

I confirm pijul alpha.56 can not be installed from crates because of clap errors.

@pmeunier must take a care.

wkordalski on December 17, 2021

This is already fixed in main, so it seems like the next alpha version publishing is needed.

lonjil on December 17, 2021

That workaround isn’t working for me, so until it’s fixed, does anyone have a tarball of main I could use?

wkordalski on December 17, 2021

If you need a workaround, the one by @quickdudley nearly works. You need to stick to clap in version 3.0.0-beta.5

Thus:

cargo download pijul=1.0.0-alpha.56 | tar -xz
cd pijul-1.0.0-alpha.56
vim Cargo.toml
# replace `[dependencies.clap] version = "3.0.0-beta.5"` with `[dependencies.clap] version = "=3.0.0-beta.5"`
# the "equals" sign prevents from using release-candidate versions of clap, which have a little different API
cargo build
# and then `cargo install <options you need>`, I haven't tried, but it should work
berkus on December 31, 2021

cargo install --locked seems to work, with some warnings about yanked packages though so it’s not ideal.

pmeunier on January 1, 2022

Fixed! I just published 1.0.0-alpha.57. Thanks for the report!

pmeunier closed this discussion on January 1, 2022