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

rerun-cli fails to install due to error in time dependency #7216

Closed
tbillington opened this issue Aug 16, 2024 · 5 comments · Fixed by #7228 or #7308
Closed

rerun-cli fails to install due to error in time dependency #7216

tbillington opened this issue Aug 16, 2024 · 5 comments · Fixed by #7228 or #7308
Assignees
Labels
🪳 bug Something isn't working 🦀 Rust API Rust logging API
Milestone

Comments

@tbillington
Copy link

$ cargo install rerun-cli --locked
...
error[E0282]: type annotations needed for `Box<_>`
  --> /home/choc/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.21/src/format_description/parse/mod.rs:83:9
   |
83 |     let items = format_items
   |         ^^^^^
...
86 |     Ok(items.into())
   |              ---- type must be known at this point
   |
help: consider giving `items` an explicit type, where the placeholders `_` are specified
   |
83 |     let items: Box<_> = format_items
   |              ++++++++

For more information about this error, try `rustc --explain E0282`.
error: could not compile `time` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `rerun-cli v0.18.0`, intermediate artifacts can be found at `/tmp/cargo-installiAlqbN`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
$ rustc --version --verbose
rustc 1.80.0 (051478957 2024-07-21)
binary: rustc
commit-hash: 051478957371ee0084a7c0913941d2a8c4757bb9
commit-date: 2024-07-21
host: x86_64-unknown-linux-gnu
release: 1.80.0
LLVM version: 18.1.7
@tbillington tbillington added 👀 needs triage This issue needs to be triaged by the Rerun team 🪳 bug Something isn't working labels Aug 16, 2024
@Wumpf
Copy link
Member

Wumpf commented Aug 16, 2024

I'm still trying to understand where this problem comes from (repros fine for me as well!), but meanwhile the following two commands seem to work:

  • cargo install rerun-sdk (without --locked)
  • cargo binstall rerun-sdk, that's using cargo binstall to download & install prebuilt binaries

@Wumpf Wumpf added 🦀 Rust API Rust logging API and removed 👀 needs triage This issue needs to be triaged by the Rerun team labels Aug 16, 2024
@Wumpf
Copy link
Member

Wumpf commented Aug 16, 2024

building without --locked picks 0.3.36 for time, but given that we also use --locked on ci for testing it's a bit unclear to me why this isn't an issue always. Maybe because we're using an older rustc version in the repo (via rust-toolchain file)? Doesn't make sense to me

@kpreid
Copy link
Collaborator

kpreid commented Aug 16, 2024

Maybe because we're using an older rustc version in the repo (via rust-toolchain file)?

Exacty. This error only happens with Rust ≥ 1.80, but rust-toolchain has 1.76. rust-toolchain applies to development and CI, but not people running cargo install from an unrelated directory.

@Wumpf
Copy link
Member

Wumpf commented Aug 17, 2024

But newer rustc versions should never fail to compile crates that compile fine with older rustc versions, right? I mean if this is about the rust version selected then what we're seeing is that time-0.3.21 compiles with rust 1.76, but not with rust 1.80 which would imply a compiler bug and I'm not ready yet to jump to that conclusion, anything else that we could be missing here 🤔

@kpreid
Copy link
Collaborator

kpreid commented Aug 17, 2024

In general, adding a trait implementation, such that there are two possibilities where there used to be one, can cause this error, but nobody wants to live in the world where “you can't add more trait implementations without a major version bump”, so It's currently in the category of “possibly acceptable breakage”. Arguably, this is a design flaw in Rust (there shouldn't be a special rule for unique implementations, so the type annotation should be required always), but a lot of stuff actually relies on that rule; here's some discussion on maybe fixing it cleverly.

@emilk emilk added this to the 0.18.1 milestone Aug 19, 2024
@emilk emilk self-assigned this Aug 19, 2024
@emilk emilk closed this as completed in 46a7035 Aug 19, 2024
emilk added a commit that referenced this issue Aug 29, 2024
…ons (#7228)

### What
* Closes #7216

`cargo +1.80.0 build -p rerun-cli` works after this

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7228?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7228?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!
* [x] If have noted any breaking changes to the log API in
`CHANGELOG.md` and the migration guide

- [PR Build Summary](https://build.rerun.io/pr/7228)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
teh-cmc pushed a commit that referenced this issue Aug 29, 2024
…ons (#7308)

* This was done already in #7228
* …but accidentally reverted in
#7226 🤦
* Closes #7216

`cargo +1.80.0 build -p rerun-cli` works after this
teh-cmc pushed a commit that referenced this issue Aug 29, 2024
…ons (#7308)

* This was done already in #7228
* …but accidentally reverted in
#7226 🤦
* Closes #7216

`cargo +1.80.0 build -p rerun-cli` works after this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 🦀 Rust API Rust logging API
Projects
None yet
4 participants