denisidoro/navi

outdated rustc version error located in rust-toolchain.toml

Opened this issue · 3 comments

Describe the bug
Error would occur if you build from source (make install) and it is caused by outdated rustc version.

To Reproduce
Steps to reproduce the behavior:

  1. Download Rust by curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh.
  2. Download navi and build by make install.
  3. See error
> make install
scripts/make install
+ case "$cmd" in
+ install
+ cargo install --path .
info: syncing channel updates for '1.67.0-x86_64-apple-darwin'
info: latest update on 2023-01-26, rust version 1.67.0 (fc594f156 2023-01-24)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
  Installing navi v2.23.0 (/navi)
    Updating crates.io index
  Downloaded cvt v0.1.2
  Downloaded colorchoice v1.0.2
  Downloaded cfg_aliases v0.2.1
  Downloaded anstream v0.6.15
  Downloaded matchers v0.1.0
  Downloaded equivalent v1.0.1
  Downloaded vte_generate_state_changes v0.1.2
  Downloaded anstyle-parse v0.2.5
  Downloaded anstyle v1.0.8
  Downloaded dirs-sys-next v0.1.2
  Downloaded directories-next v2.0.0
  Downloaded either v1.13.0
  Downloaded clap_lex v0.7.2
  Downloaded anstyle-query v1.1.1
  Downloaded strip-ansi-escapes v0.1.1
  Downloaded normpath v1.3.0
  Downloaded lazy_static v1.5.0
  Downloaded home v0.5.9
  Downloaded fastrand v2.1.1
  Downloaded signal-hook-registry v1.4.2
  Downloaded errno v0.3.9
  Downloaded is_terminal_polyfill v1.70.1
  Downloaded thiserror-impl v1.0.63
  Downloaded heck v0.5.0
  Downloaded scopeguard v1.2.0
  Downloaded signal-hook-mio v0.2.4
  Downloaded synstructure v0.12.6
  Downloaded itoa v1.0.11
  Downloaded remove_dir_all v0.8.3
  Downloaded thiserror v1.0.63
  Downloaded which v4.4.2
  Downloaded clap_derive v4.5.13
  Downloaded cfg-if v1.0.0
  Downloaded strsim v0.11.1
  Downloaded autocfg v1.3.0
  Downloaded arrayvec v0.5.2
  Downloaded utf8parse v0.2.2
  Downloaded unicode-xid v0.2.5
  Downloaded parking_lot_core v0.9.10
  Downloaded tracing-log v0.2.0
  Downloaded thread_local v1.1.8
  Downloaded lock_api v0.4.12
  Downloaded walkdir v2.5.0
  Downloaded tempfile v3.12.0
  Downloaded vte v0.10.1
  Downloaded once_cell v1.19.0
  Downloaded quote v1.0.37
  Downloaded pin-project-lite v0.2.14
  Downloaded smallvec v1.13.2
  Downloaded overload v0.1.1
  Downloaded fs_at v0.2.1
  Downloaded nu-ansi-term v0.46.0
  Downloaded tracing-attributes v0.1.27
  Downloaded dns_common_derive v0.2.1
  Downloaded dns_common v0.2.1
  Downloaded shellwords v1.1.0
  Downloaded bitflags v1.3.2
  Downloaded parking_lot v0.12.3
  Downloaded bitflags v2.6.0
  Downloaded same-file v1.0.6
  Downloaded signal-hook v0.3.17
  Downloaded ryu v1.0.18
  Downloaded log v0.4.22
  Downloaded unicode-ident v1.0.12
  Downloaded etcetera v0.7.1
  Downloaded anyhow v1.0.87
  Downloaded sharded-slab v0.1.7
  Downloaded proc-macro2 v1.0.86
  Downloaded edit v0.1.5
  Downloaded clap v4.5.17
  Downloaded serde_yaml v0.9.34+deprecated
  Downloaded serde_derive v1.0.210
  Downloaded tracing-core v0.1.32
  Downloaded serde v1.0.210
  Downloaded unsafe-libyaml v0.2.11
  Downloaded tracing v0.1.40
  Downloaded indexmap v2.5.0
  Downloaded memchr v2.7.4
  Downloaded mio v0.8.11
  Downloaded hashbrown v0.14.5
  Downloaded crossterm v0.26.1
  Downloaded regex-automata v0.1.10
  Downloaded clap_builder v4.5.17
  Downloaded serde_json v1.0.128
  Downloaded aho-corasick v1.1.3
  Downloaded tracing-subscriber v0.3.18
  Downloaded syn v1.0.109
  Downloaded regex v1.10.6
  Downloaded syn v2.0.77
  Downloaded regex-syntax v0.6.29
  Downloaded nix v0.29.0
  Downloaded regex-syntax v0.8.4
  Downloaded rustix v0.38.36
  Downloaded unicode-width v0.1.13
  Downloaded regex-automata v0.4.7
  Downloaded libc v0.2.158
  Downloaded 96 crates (7.2 MB) in 2.92s
error: failed to compile `navi v2.23.0 (/navi)`, intermediate artifacts can be found at `/navi/target`

Caused by:
  package `normpath v1.3.0` cannot be built because it requires rustc 1.74.0 or newer, while the currently active rustc version is 1.67.0
  Either upgrade to rustc 1.74.0 or newer, or use
  cargo update -p normpath@1.3.0 --precise ver
  where `ver` is the latest version of `normpath` supporting rustc 1.67.0
make: *** [install] Error 101

Expected behavior
Should be able to download required packages as such.

> make install
scripts/make install
+ case "$cmd" in
+ install
+ cargo install --path .
info: syncing channel updates for '1.81.0-x86_64-apple-darwin'
info: latest update on 2024-09-05, rust version 1.81.0 (eeb90cda1 2024-09-04)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
  Installing navi v2.23.0 (/navi)
    Updating crates.io index
     Locking 134 packages to latest compatible versions
      Adding arrayvec v0.5.2 (latest: v0.7.6)
      Adding bitflags v1.3.2 (latest: v2.6.0)
      Adding crossterm v0.26.1 (latest: v0.28.1)
      Adding etcetera v0.7.1 (latest: v0.8.0)
      Adding linux-raw-sys v0.4.14 (latest: v0.6.5)
      Adding matchers v0.1.0 (latest: v0.2.0)
      Adding mio v0.8.11 (latest: v1.0.2)
      Adding nu-ansi-term v0.46.0 (latest: v0.50.1)
      Adding regex-automata v0.1.10 (latest: v0.4.7)
      Adding regex-syntax v0.6.29 (latest: v0.8.4)
      Adding strip-ansi-escapes v0.1.1 (latest: v0.2.0)
      Adding syn v1.0.109 (latest: v2.0.77)
      Adding synstructure v0.12.6 (latest: v0.13.1)
      Adding vte v0.10.1 (latest: v0.13.0)
      Adding wasi v0.11.0+wasi-snapshot-preview1 (latest: v0.13.2+wasi-0.2.1)
      Adding which v4.4.2 (latest: v6.0.3)
      Adding windows-sys v0.48.0 (latest: v0.59.0)
      Adding windows-sys v0.52.0 (latest: v0.59.0)
      Adding windows-targets v0.48.5 (latest: v0.52.6)
      Adding windows_aarch64_gnullvm v0.48.5 (latest: v0.52.6)
      Adding windows_aarch64_msvc v0.48.5 (latest: v0.52.6)
      Adding windows_i686_gnu v0.48.5 (latest: v0.52.6)
      Adding windows_i686_msvc v0.48.5 (latest: v0.52.6)
      Adding windows_x86_64_gnu v0.48.5 (latest: v0.52.6)
      Adding windows_x86_64_gnullvm v0.48.5 (latest: v0.52.6)
      Adding windows_x86_64_msvc v0.48.5 (latest: v0.52.6)
  Downloaded matchers v0.1.0
  Downloaded anstyle-query v1.1.1
  Downloaded cvt v0.1.2
  Downloaded dns_common_derive v0.2.1
  Downloaded equivalent v1.0.1
  Downloaded dns_common v0.2.1
  Downloaded shellwords v1.1.0
  Downloaded vte_generate_state_changes v0.1.2
  Downloaded itoa v1.0.11
  Downloaded cfg_aliases v0.2.1
  Downloaded anstyle-parse v0.2.5
  Downloaded either v1.13.0
  Downloaded clap_lex v0.7.2
  Downloaded errno v0.3.9
  Downloaded dirs-sys-next v0.1.2
  Downloaded fastrand v2.1.1
  Downloaded anstyle v1.0.8
  Downloaded same-file v1.0.6
  Downloaded is_terminal_polyfill v1.70.1
  Downloaded home v0.5.9
  Downloaded strsim v0.11.1
  Downloaded lazy_static v1.5.0
  Downloaded edit v0.1.5
  Downloaded autocfg v1.3.0
  Downloaded walkdir v2.5.0
  Downloaded thiserror-impl v1.0.63
  Downloaded signal-hook-mio v0.2.4
  Downloaded colorchoice v1.0.2
  Downloaded etcetera v0.7.1
  Downloaded cfg-if v1.0.0
  Downloaded scopeguard v1.2.0
  Downloaded utf8parse v0.2.2
  Downloaded strip-ansi-escapes v0.1.1
  Downloaded heck v0.5.0
  Downloaded thiserror v1.0.63
  Downloaded which v4.4.2
  Downloaded arrayvec v0.5.2
  Downloaded anstream v0.6.15
  Downloaded unicode-xid v0.2.5
  Downloaded thread_local v1.1.8
  Downloaded once_cell v1.19.0
  Downloaded smallvec v1.13.2
  Downloaded quote v1.0.37
  Downloaded pin-project-lite v0.2.14
  Downloaded tempfile v3.12.0
  Downloaded vte v0.10.1
  Downloaded directories-next v2.0.0
  Downloaded normpath v1.3.0
  Downloaded fs_at v0.2.1
  Downloaded clap_derive v4.5.13
  Downloaded lock_api v0.4.12
  Downloaded synstructure v0.12.6
  Downloaded signal-hook-registry v1.4.2
  Downloaded remove_dir_all v0.8.3
  Downloaded overload v0.1.1
  Downloaded tracing-log v0.2.0
  Downloaded parking_lot v0.12.3
  Downloaded bitflags v2.6.0
  Downloaded anyhow v1.0.87
  Downloaded signal-hook v0.3.17
  Downloaded parking_lot_core v0.9.10
  Downloaded log v0.4.22
  Downloaded serde_derive v1.0.210
  Downloaded proc-macro2 v1.0.86
  Downloaded tracing-attributes v0.1.27
  Downloaded bitflags v1.3.2
  Downloaded nu-ansi-term v0.46.0
  Downloaded sharded-slab v0.1.7
  Downloaded ryu v1.0.18
  Downloaded tracing-core v0.1.32
  Downloaded clap v4.5.17
  Downloaded unsafe-libyaml v0.2.11
  Downloaded unicode-ident v1.0.12
  Downloaded serde v1.0.210
  Downloaded tracing v0.1.40
  Downloaded serde_yaml v0.9.34+deprecated
  Downloaded indexmap v2.5.0
  Downloaded mio v0.8.11
  Downloaded memchr v2.7.4
  Downloaded regex-automata v0.1.10
  Downloaded crossterm v0.26.1
  Downloaded hashbrown v0.14.5
  Downloaded serde_json v1.0.128
  Downloaded aho-corasick v1.1.3
  Downloaded clap_builder v4.5.17
  Downloaded tracing-subscriber v0.3.18
  Downloaded syn v1.0.109
  Downloaded syn v2.0.77
  Downloaded regex v1.10.6
  Downloaded regex-syntax v0.6.29
  Downloaded nix v0.29.0
  Downloaded regex-syntax v0.8.4
  Downloaded rustix v0.38.36
  Downloaded unicode-width v0.1.13
  Downloaded regex-automata v0.4.7
  Downloaded libc v0.2.158
  Downloaded 96 crates (7.2 MB) in 3.66s
   Compiling proc-macro2 v1.0.86
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.158
   Compiling cfg-if v1.0.0
   Compiling once_cell v1.19.0
   Compiling bitflags v2.6.0
   Compiling memchr v2.7.4
   Compiling log v0.4.22
   Compiling utf8parse v0.2.2
   Compiling smallvec v1.13.2
   Compiling regex-syntax v0.8.4
   Compiling serde v1.0.210
   Compiling rustix v0.38.36
   Compiling cfg_aliases v0.2.1
   Compiling autocfg v1.3.0
   Compiling nix v0.29.0
   Compiling tracing-core v0.1.32
   Compiling signal-hook v0.3.17
   Compiling lazy_static v1.5.0
   Compiling parking_lot_core v0.9.10
   Compiling syn v1.0.109
   Compiling lock_api v0.4.12
   Compiling aho-corasick v1.1.3
   Compiling regex-syntax v0.6.29
   Compiling regex-automata v0.4.7
   Compiling regex-automata v0.1.10
   Compiling anstyle-parse v0.2.5
   Compiling pin-project-lite v0.2.14
   Compiling equivalent v1.0.1
   Compiling ryu v1.0.18
   Compiling overload v0.1.1
   Compiling anstyle v1.0.8
   Compiling itoa v1.0.11
   Compiling is_terminal_polyfill v1.70.1
   Compiling quote v1.0.37
   Compiling colorchoice v1.0.2
   Compiling serde_json v1.0.128
   Compiling syn v2.0.77
   Compiling anstyle-query v1.1.1
   Compiling anyhow v1.0.87
   Compiling scopeguard v1.2.0
   Compiling home v0.5.9
   Compiling hashbrown v0.14.5
   Compiling regex v1.10.6
   Compiling anstream v0.6.15
   Compiling errno v0.3.9
   Compiling signal-hook-registry v1.4.2
   Compiling dirs-sys-next v0.1.2
   Compiling mio v0.8.11
   Compiling indexmap v2.5.0
   Compiling vte_generate_state_changes v0.1.2
   Compiling nu-ansi-term v0.46.0
   Compiling matchers v0.1.0
   Compiling tracing-log v0.2.0
   Compiling sharded-slab v0.1.7
   Compiling thread_local v1.1.8
   Compiling cvt v0.1.2
   Compiling clap_lex v0.7.2
   Compiling arrayvec v0.5.2
   Compiling thiserror v1.0.63
   Compiling fastrand v2.1.1
   Compiling either v1.13.0
   Compiling unicode-xid v0.2.5
   Compiling unsafe-libyaml v0.2.11
   Compiling strsim v0.11.1
   Compiling heck v0.5.0
   Compiling vte v0.10.1
   Compiling which v4.4.2
   Compiling clap_builder v4.5.17
   Compiling tempfile v3.12.0
   Compiling fs_at v0.2.1
   Compiling signal-hook-mio v0.2.4
   Compiling parking_lot v0.12.3
   Compiling directories-next v2.0.0
   Compiling same-file v1.0.6
   Compiling normpath v1.3.0
   Compiling bitflags v1.3.2
   Compiling synstructure v0.12.6
   Compiling crossterm v0.26.1
   Compiling walkdir v2.5.0
   Compiling remove_dir_all v0.8.3
   Compiling strip-ansi-escapes v0.1.1
   Compiling edit v0.1.5
   Compiling shellwords v1.1.0
   Compiling etcetera v0.7.1
   Compiling unicode-width v0.1.13
   Compiling dns_common_derive v0.2.1
   Compiling serde_derive v1.0.210
   Compiling tracing-attributes v0.1.27
   Compiling thiserror-impl v1.0.63
   Compiling clap_derive v4.5.13
   Compiling tracing v0.1.40
   Compiling clap v4.5.17
   Compiling tracing-subscriber v0.3.18
   Compiling serde_yaml v0.9.34+deprecated
   Compiling dns_common v0.2.1
   Compiling navi v2.23.0 (/navi)
warning: unused imports: `InvalidPath` and `UnreadableDir`
 --> src/filesystem.rs:1:77
  |
1 | pub use crate::common::fs::{create_dir, exe_string, read_lines, remove_dir, InvalidPath, UnreadableDir};
  |                                                                             ^^^^^^^^^^^  ^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: field `0` is never read
  --> src/common/terminal.rs:53:18
   |
53 | pub struct Color(pub style::Color);
   |            ----- ^^^^^^^^^^^^^^^^
   |            |
   |            field in this struct
   |
   = help: consider removing this field
   = note: `Color` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
   = note: `#[warn(dead_code)]` on by default

warning: `navi` (lib) generated 2 warnings (run `cargo fix --lib -p navi` to apply 1 suggestion)
    Finished `release` profile [optimized] target(s) in 54.32s
  Installing /.cargo/bin/navi
   Installed package `navi v2.23.0 (/navi)` (executable `navi`)

Versions:

  • OS: macOS
  • Shell Version : GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin23)

Additional context
Thank you all for building an amazing tool, let's keep it updated : )

Thanks for opening your first issue here! In case you're facing a bug, please update navi to the latest version first. Maybe the bug is already solved! :)

cat rust-toolchain.toml
outputs

[toolchain]
channel = "1.67.0"
components = [ "rustfmt", "clippy" ]

It should be at least:

  • channel = "1.69.0" for Ubuntu 24.04
  • channel = "1.74.0" for your macOS
  • etc.

Other workaround is to export RUSTUP_TOOLCHAIN=stable, so whole installation is:
git clone https://github.com/denisidoro/navi ~/.navi && cd ~/.navi && export RUSTUP_TOOLCHAIN=stable && make install

@juanMarinero Thank you for helping me clarifying, "Expected Behavior" in this issue is result after updated channel version.