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

Installation fails without --locked #1285

Closed
1 task done
mo8it opened this issue Aug 26, 2023 · 3 comments · Fixed by #1286
Closed
1 task done

Installation fails without --locked #1285

mo8it opened this issue Aug 26, 2023 · 3 comments · Fixed by #1286
Labels
bug Something isn't working the way that is expected.

Comments

@mo8it
Copy link

mo8it commented Aug 26, 2023

Checklist

What version of bottom are you running?

0.9.5

How did you install bottom?

cargo install bottom without --locked

Describe the issue

When installing bottom using cargo install bottom, the installation fails after the update 0.9.5.

What is the expected behaviour?

bottom should be installed without --locked

What is the actual behaviour?

The compilation fails with the following output:

$ cargo install bottom
    Updating crates.io index
  Installing bottom v0.9.5
    Updating crates.io index
   Compiling libc v0.2.147
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.1.0
   Compiling io-lifetimes v1.0.11
   Compiling rustix v0.37.23
   Compiling proc-macro2 v1.0.66
   Compiling unicode-ident v1.0.11
   Compiling scopeguard v1.2.0
   Compiling bitflags v1.3.2
   Compiling crossbeam-utils v0.8.16
   Compiling utf8parse v0.2.1
   Compiling linux-raw-sys v0.3.8
   Compiling memchr v2.5.0
   Compiling anstyle v1.0.2
   Compiling syn v1.0.109
   Compiling colorchoice v1.0.0
   Compiling once_cell v1.18.0
   Compiling anstyle-query v1.0.0
   Compiling version_check v0.9.4
   Compiling anstyle-parse v0.2.1
   Compiling signal-hook v0.3.17
   Compiling parking_lot_core v0.9.8
   Compiling anstream v0.5.0
   Compiling clap_lex v0.5.1
   Compiling strsim v0.10.0
   Compiling smallvec v1.11.0
   Compiling fnv v1.0.7
   Compiling strsim v0.9.3
   Compiling memoffset v0.9.0
   Compiling lock_api v0.4.10
   Compiling crossbeam-epoch v0.9.15
   Compiling ahash v0.8.3
   Compiling serde v1.0.188
   Compiling unicode-xid v0.0.4
   Compiling ident_case v1.0.1
   Compiling log v0.4.20
   Compiling synom v0.11.3
   Compiling num-traits v0.2.16
   Compiling typenum v1.16.0
   Compiling rayon-core v1.11.0
   Compiling quote v0.3.15
   Compiling static_assertions v1.1.0
   Compiling quote v1.0.33
   Compiling crossbeam-channel v0.5.8
   Compiling paste v1.0.14
   Compiling syn v0.11.11
   Compiling syn v2.0.29
   Compiling crossbeam-deque v0.8.3
   Compiling bitflags v2.4.0
   Compiling thiserror v1.0.47
   Compiling allocator-api2 v0.2.16
   Compiling either v1.9.0
   Compiling roff v0.2.1
   Compiling aho-corasick v1.0.4
   Compiling libloading v0.7.4
   Compiling option-ext v0.2.0
   Compiling time-core v0.1.1
   Compiling equivalent v1.0.1
   Compiling hashbrown v0.14.0
   Compiling gimli v0.28.0
   Compiling rustix v0.38.9
   Compiling adler v1.0.2
   Compiling signal-hook-registry v1.4.1
   Compiling mio v0.8.8
   Compiling cc v1.0.83
   Compiling signal-hook-mio v0.2.3
   Compiling parking_lot v0.12.1
   Compiling num_cpus v1.16.0
   Compiling serde_codegen_internals v0.14.2
   Compiling anyhow v1.0.75
   Compiling regex-syntax v0.7.5
   Compiling starship-battery v0.8.2
   Compiling crossterm v0.26.1
   Compiling indexmap v2.0.0
   Compiling serde_derive v0.9.15
   Compiling uom v0.35.0
   Compiling terminal_size v0.2.6
   Compiling rayon v1.7.0
   Compiling clap_builder v4.4.0
   Compiling dirs-sys v0.4.1
   Compiling backtrace v0.3.69
   Compiling nix v0.26.2
   Compiling miniz_oxide v0.7.1
   Compiling time-macros v0.2.13
   Compiling nvml-wrapper-sys v0.7.0
   Compiling thiserror-impl v1.0.47
   Compiling toml_datetime v0.6.3
   Compiling darling_core v0.10.2
   Compiling regex-automata v0.3.7
   Compiling serde_spanned v0.6.3
   Compiling addr2line v0.21.0
   Compiling object v0.32.0
   Compiling itoa v1.0.9
   Compiling cassowary v0.3.0
   Compiling linux-raw-sys v0.4.5
   Compiling unicode-width v0.1.10
   Compiling clap v4.4.0
   Compiling deranged v0.3.8
   Compiling clap_mangen v0.2.13
   Compiling clap_complete v4.4.0
   Compiling rustc-demangle v0.1.23
   Compiling lazycell v1.3.0
   Compiling indoc v2.0.3
   Compiling winnow v0.5.15
   Compiling unicode-segmentation v1.10.1
   Compiling sysinfo v0.29.8
   Compiling ratatui v0.22.0
   Compiling serde v0.9.15
   Compiling ctrlc v3.4.0
   Compiling time v0.3.27
   Compiling dirs v5.0.1
   Compiling crossterm v0.27.0
   Compiling itertools v0.11.0
   Compiling kstring v2.0.0
   Compiling bottom v0.9.5
   Compiling regex v1.9.4
   Compiling darling_macro v0.10.2
   Compiling darling v0.10.2
   Compiling toml_edit v0.19.14
   Compiling wrapcenum-derive v0.4.0
   Compiling concat-string v1.0.1
   Compiling humantime v2.1.0
   Compiling nvml-wrapper v0.9.0
error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> /var/home/mo8it/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bottom-0.9.5/src/widgets/process_table.rs:122:11
    |
122 | impl<'de> Deserialize<'de> for ProcWidgetColumn {
    |           ^^^^^^^^^^^----- help: remove these generics
    |           |
    |           expected 0 lifetime arguments
    |
note: trait defined here, with 0 lifetime parameters
   --> /var/home/mo8it/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-0.9.15/src/de/mod.rs:458:11
    |
458 | pub trait Deserialize: Sized {
    |           ^^^^^^^^^^^

error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> /var/home/mo8it/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bottom-0.9.5/src/widgets/process_table.rs:125:19
    |
125 |         D: serde::Deserializer<'de>,
    |                   ^^^^^^^^^^^^----- help: remove these generics
    |                   |
    |                   expected 0 lifetime arguments
    |
note: trait defined here, with 0 lifetime parameters
   --> /var/home/mo8it/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-0.9.15/src/de/mod.rs:712:11
    |
712 | pub trait Deserializer: Sized {
    |           ^^^^^^^^^^^^

error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> /var/home/mo8it/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bottom-0.9.5/src/widgets/process_table/proc_widget_column.rs:29:11
    |
29  | impl<'de> Deserialize<'de> for ProcColumn {
    |           ^^^^^^^^^^^----- help: remove these generics
    |           |
    |           expected 0 lifetime arguments
    |
note: trait defined here, with 0 lifetime parameters
   --> /var/home/mo8it/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-0.9.15/src/de/mod.rs:458:11
    |
458 | pub trait Deserialize: Sized {
    |           ^^^^^^^^^^^

error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> /var/home/mo8it/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bottom-0.9.5/src/widgets/process_table/proc_widget_column.rs:32:19
    |
32  |         D: serde::Deserializer<'de>,
    |                   ^^^^^^^^^^^^----- help: remove these generics
    |                   |
    |                   expected 0 lifetime arguments
    |
note: trait defined here, with 0 lifetime parameters
   --> /var/home/mo8it/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-0.9.15/src/de/mod.rs:712:11
    |
712 | pub trait Deserializer: Sized {
    |           ^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0107`.
error: could not compile `bottom` (lib) due to 4 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `bottom v0.9.5`, intermediate artifacts can be found at `/tmp/cargo-installyyMo0y`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

How can we reproduce this?

Run cargo install bottom

Additional information

It works with the --locked flag.

It should be related to pinning serde which is not necessary anymore as mentioned in this comment.

It would be nice to revert that pinning. Thank you for developing bottom ❤️❤️❤️

@mo8it mo8it added the bug Something isn't working the way that is expected. label Aug 26, 2023
@ClementTsang
Copy link
Owner

ClementTsang commented Aug 26, 2023

I'll look into it, but fwiw it's specified outright in the README that omitting --locked may cause problems specifically for reasons like this.

@mo8it
Copy link
Author

mo8it commented Aug 27, 2023

I understand this recommendation. But people using cargo-update like me would have to run cargo install-update-config --enforce-lock CRATE for every crate they install. Plus bug fixes should be installed for dependencies which is why --locked is not the default. Personally, I only use --locked if I face any issues. But again, I understand the recommendation and you don't have to deal with this if you don't want to ❤️ I just wanted to warn.

@ClementTsang
Copy link
Owner

Nah I understand, don't worry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working the way that is expected.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants