knurling-rs / probe-run

Run embedded programs just like native ones
Apache License 2.0
645 stars 75 forks source link

`probe-run` fails to build due to yanked dependency #393

Closed KizzyCode closed 1 year ago

KizzyCode commented 1 year ago

Describe the bug probe-run fails to build because defmt-decoder = "=0.3.5" has been yanked.

To Reproduce Run cargo install probe-run --version=0.3.7

Expected and observed behavior Expected: probe-run is installed successfully. Observed: probe-run cannot be installed.

Example:

$ cargo install probe-run --version=0.3.7 
    Updating crates.io index
  Installing probe-run v0.3.7
error: failed to compile `probe-run v0.3.7`, intermediate artifacts can be found at `/var/folders/3k/j_by2bw56jd5w_ss9c8qr3kc0000gn/T/cargo-installn96znm`

Caused by:
  failed to select a version for the requirement `defmt-decoder = "=0.3.5"`
  candidate versions found which didn't match: 0.3.6, 0.3.4, 0.3.3, ...
  location searched: crates.io index
  required by package `probe-run v0.3.7`

Operating System: macOS Ventura Version 13.3 (22E252)

sureshjoshi commented 1 year ago

Context: It looks like that version was yanked about 4-5 hours ago.

https://github.com/knurling-rs/defmt/pull/748

goldenMetteyya commented 1 year ago

will this be fixed soon?

KizzyCode commented 1 year ago

@goldenMetteyya If you're asking because you're unable to install the app, there are two workarounds:

  1. You can force the installation using the --locked-switch (i.e. cargo install probe-run --locked) – if this is a good idea or not depends on the reason why defmt-decoder has been yanked (haven't looked into this).

  2. You can install an older version (e.g. 0.3.6) using cargo install probe-run --version=0.3.6

tommy-gilligan commented 1 year ago

I'm seeing the same problem. Heartened that others have already stumbled across the same issue.

I've tried a few different versions of probe-run but I now get

% cargo run
    Finished dev [optimized + debuginfo] target(s) in 0.02s
     Running `probe-run --chip RP2040 target/thumbv6m-none-eabi/debug/rp2040-project-template`
Error: defmt wire format version mismatch: firmware is using 4, `probe-run` supports 3
suggestion: `cargo install` a different version of `probe-run` that supports defmt 4

A stab in the dark: this is why something was yanked? I'm not working on anything important so not too worried.

tommy-gilligan commented 1 year ago

Changing defmt line to defmt = "=0.3.2" in Cargo.toml and using probe-run 0.3.4 works for me. For anybody else with the same issue you might need to do cargo clean also.

overheat commented 1 year ago
➜ cargo install probe-run
    Updating crates.io index
  Installing probe-run v0.3.7
error: failed to compile `probe-run v0.3.7`, intermediate artifacts can be found at `/var/folders/7n/r69j66410wvffm42j24q6wnr0000gn/T/cargo-installfdkxiL`

Caused by:
  failed to select a version for the requirement `defmt-decoder = "=0.3.5"`
  candidate versions found which didn't match: 0.3.6, 0.3.4, 0.3.3, ...
  location searched: crates.io index
  required by package `probe-run v0.3.7`

Same reason?

elpiel commented 1 year ago

Please refer to PR #395

justahero commented 1 year ago

Thanks for raising the issue & all others for providing usable workarounds.

A new version of probe-run (version 0.3.8) has been released now and should fix the dependency problem.