gobanos/cargo-aoc

Cannot install cargo-aoc

Closed this issue · 2 comments

Log from a fresh folder:

cargo install cargo-aoc@0.3.7
    Updating crates.io index
  Installing cargo-aoc v0.3.7
    Updating crates.io index
     Locking 185 packages to latest compatible versions
      Adding addr2line v0.22.0 (latest: v0.24.0)
      Adding base64 v0.21.7 (latest: v0.22.1)
      Adding bitflags v1.3.2 (latest: v2.6.0)
      Adding chrono-tz v0.8.6 (latest: v0.9.0)
      Adding chrono-tz-build v0.2.1 (latest: v0.3.0)
      Adding gimli v0.29.0 (latest: v0.31.0)
      Adding h2 v0.3.26 (latest: v0.4.5)
      Adding http v0.2.12 (latest: v1.1.0)
      Adding http-body v0.4.6 (latest: v1.0.1)
      Adding hyper v0.14.30 (latest: v1.4.1)
      Adding hyper-rustls v0.24.2 (latest: v0.27.2)
      Adding idna v0.5.0 (latest: v1.0.2)
      Adding jni-sys v0.3.0 (latest: v0.4.0)
      Adding malloc_buf v0.0.6 (latest: v1.0.0)
      Adding mio v0.8.11 (latest: v1.0.0)
      Adding raw-window-handle v0.5.2 (latest: v0.6.2)
      Adding reqwest v0.11.27 (latest: v0.12.5)
      Adding rustls v0.21.12 (latest: v0.23.11)
      Adding rustls-pemfile v1.0.4 (latest: v2.1.2)
      Adding rustls-webpki v0.101.7 (latest: v0.102.5)
      Adding siphasher v0.3.11 (latest: v1.0.1)
      Adding sync_wrapper v0.1.2 (latest: v1.0.1)
      Adding system-configuration v0.5.1 (latest: v0.6.0)
      Adding system-configuration-sys v0.5.0 (latest: v0.6.0)
      Adding tokio-rustls v0.24.1 (latest: v0.26.0)
      Adding wasi v0.11.0+wasi-snapshot-preview1 (latest: v0.13.1+wasi-0.2.0)
      Adding webbrowser v0.8.15 (latest: v1.0.1)
      Adding webpki-roots v0.25.4 (latest: v0.26.3)
      Adding windows-core v0.52.0 (latest: v0.58.0)
      Adding windows-sys v0.45.0 (latest: v0.52.0)
      Adding windows-sys v0.48.0 (latest: v0.52.0)
      Adding windows-targets v0.42.2 (latest: v0.52.6)
      Adding windows-targets v0.48.5 (latest: v0.52.6)
      Adding windows_aarch64_gnullvm v0.42.2 (latest: v0.52.6)
      Adding windows_aarch64_gnullvm v0.48.5 (latest: v0.52.6)
      Adding windows_aarch64_msvc v0.42.2 (latest: v0.52.6)
      Adding windows_aarch64_msvc v0.48.5 (latest: v0.52.6)
      Adding windows_i686_gnu v0.42.2 (latest: v0.52.6)
      Adding windows_i686_gnu v0.48.5 (latest: v0.52.6)
      Adding windows_i686_msvc v0.42.2 (latest: v0.52.6)
      Adding windows_i686_msvc v0.48.5 (latest: v0.52.6)
      Adding windows_x86_64_gnu v0.42.2 (latest: v0.52.6)
      Adding windows_x86_64_gnu v0.48.5 (latest: v0.52.6)
      Adding windows_x86_64_gnullvm v0.42.2 (latest: v0.52.6)
      Adding windows_x86_64_gnullvm v0.48.5 (latest: v0.52.6)
      Adding windows_x86_64_msvc v0.42.2 (latest: v0.52.6)
      Adding windows_x86_64_msvc v0.48.5 (latest: v0.52.6)
      Adding winreg v0.50.0 (latest: v0.52.0)
   Compiling libc v0.2.155
   Compiling autocfg v1.3.0
   Compiling cc v1.1.5
   Compiling serde v1.0.204
   Compiling pin-project-lite v0.2.14
   Compiling bytes v1.6.1
   Compiling cfg-if v1.0.0
   Compiling itoa v1.0.11
   Compiling proc-macro2 v1.0.86
   Compiling siphasher v0.3.11
   Compiling core-foundation-sys v0.8.6
   Compiling untrusted v0.9.0
   Compiling phf_shared v0.11.2
   Compiling equivalent v1.0.1
   Compiling futures-core v0.3.30
   Compiling hashbrown v0.14.5
   Compiling rand_core v0.6.4
   Compiling unicode-ident v1.0.12
   Compiling regex-syntax v0.8.4
   Compiling spin v0.9.8
   Compiling rand v0.8.5
   Compiling slab v0.4.9
   Compiling tinyvec_macros v0.1.1
   Compiling fnv v1.0.7
   Compiling once_cell v1.19.0
   Compiling tracing-core v0.1.32
   Compiling phf_generator v0.11.2
   Compiling http v0.2.12
   Compiling indexmap v2.2.6
   Compiling tinyvec v1.8.0
   Compiling futures-sink v0.3.30
   Compiling quote v1.0.36
   Compiling socket2 v0.5.7
   Compiling ring v0.17.8
   Compiling mio v0.8.11
   Compiling getrandom v0.2.15
   Compiling regex-automata v0.4.7
   Compiling log v0.4.22
   Compiling futures-task v0.3.30
   Compiling pin-utils v0.1.0
   Compiling memchr v2.7.4
   Compiling tokio v1.38.1
   Compiling rustls v0.21.12
   Compiling httparse v1.9.4
   Compiling futures-io v0.3.30
   Compiling percent-encoding v2.3.1
   Compiling form_urlencoded v1.2.1
   Compiling futures-util v0.3.30
   Compiling unicode-normalization v0.1.23
   Compiling syn v2.0.71
   Compiling tracing v0.1.40
   Compiling phf_codegen v0.11.2
   Compiling num-traits v0.2.19
   Compiling phf v0.11.2
   Compiling ryu v1.0.18
   Compiling unicode-bidi v0.3.15
   Compiling utf8parse v0.2.2
   Compiling try-lock v0.2.5
   Compiling system-configuration-sys v0.5.0
   Compiling regex v1.10.5
   Compiling want v0.3.1
   Compiling idna v0.5.0
   Compiling parse-zoneinfo v0.3.1
   Compiling anstyle-parse v0.2.4
   Compiling chrono-tz-build v0.2.1
   Compiling http-body v0.4.6
   Compiling core-foundation v0.9.4
   Compiling futures-channel v0.3.30
   Compiling anstyle-query v1.1.0
   Compiling is_terminal_polyfill v1.70.0
   Compiling tower-service v0.3.2
   Compiling colorchoice v1.0.1
   Compiling anstyle v1.0.7
   Compiling httpdate v1.0.3
   Compiling serde_json v1.0.120
   Compiling anstream v0.6.14
   Compiling chrono-tz v0.8.6
   Compiling serde_spanned v0.6.6
   Compiling toml_datetime v0.6.6
   Compiling url v2.5.2
   Compiling iana-time-zone v0.1.60
   Compiling strsim v0.11.1
   Compiling clap_lex v0.7.1
   Compiling option-ext v0.2.0
   Compiling bitflags v1.3.2
   Compiling base64 v0.21.7
   Compiling winnow v0.6.13
   Compiling heck v0.5.0
   Compiling clap_builder v4.5.9
   Compiling dirs-sys v0.4.1
   Compiling chrono v0.4.38
   Compiling rustls-pemfile v1.0.4
   Compiling system-configuration v0.5.1
   Compiling tokio-util v0.7.11
   Compiling h2 v0.3.26
   Compiling clap_derive v4.5.8
   Compiling serde_derive v1.0.204
   Compiling toml_edit v0.22.16
   Compiling serde_urlencoded v0.7.1
   Compiling encoding_rs v0.8.34
   Compiling rustls-webpki v0.101.7
   Compiling sct v0.7.1
   Compiling hyper v0.14.30
   Compiling mime v0.3.17
   Compiling webpki-roots v0.25.4
   Compiling ipnet v2.9.0
   Compiling sync_wrapper v0.1.2
   Compiling aoc-runner-internal v0.1.0
   Compiling toml v0.8.15
   Compiling clap v4.5.9
   Compiling directories v5.0.1
   Compiling tokio-rustls v0.24.1
   Compiling hyper-rustls v0.24.2
   Compiling reqwest v0.11.27
   Compiling webbrowser v0.8.15
   Compiling cargo-aoc v0.3.7
error[E0599]: no function or associated item named `new` found for struct `Runtime` in the current scope
   --> /Users/pim/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-aoc-0.3.7/src/app.rs:61:47
    |
61  | ...:runtime::Runtime::new().unwrap();
    |                       ^^^ function or associated item not found in `Runtime`
    |
note: if you're trying to build a new `Runtime`, consider using `Runtime::from_parts` which returns `Runtime`
   --> /Users/pim/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.1/src/runtime/runtime.rs:138:5
    |
138 | /     pub(super) fn from_parts(
139 | |         scheduler: Scheduler,
140 | |         handle: Handle,
141 | |         blocking_pool: BlockingPool,
142 | |     ) -> Runtime {
    | |________________^

For more information about this error, try `rustc --explain E0599`.
error: could not compile `cargo-aoc` (bin "cargo-aoc") due to 1 previous error
error: failed to compile `cargo-aoc v0.3.7`, intermediate artifacts can be found at `/var/folders/5_/dw0946557y730dhlrv5kwt3r0000gn/T/cargo-installOUk0l3`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

I hit this issue just now when trying to install. Looks like it fails due to a breaking change in tokio. @PimTournaye You can install it using the exact version in the Cargo.lock file by running cargo install cargo-aoc --locked.

gobanos commented

Done thanks to @vintitres !