evcxr / evcxr

Other
5.5k stars 217 forks source link

Error: Failed to read Cargo metadata from Cargo.toml file /tmp/.tmpPNGPVp/Cargo.toml #221

Closed Ran-Xing closed 2 years ago

Ran-Xing commented 2 years ago
bash <(curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf) -y \
&& /root/.cargo/bin/rustup component add rust-src \
&& /root/.cargo/bin/cargo install evcxr_jupyter cargo-edit \
&& /root/.cargo/bin/evcxr_jupyter --install \
&& cargo init /root/notebook
2022-05-04T13:41:08.685902637Z Error: Failed to read Cargo metadata from Cargo.toml file /tmp/.tmpPNGPVp/Cargo.toml, cargo 1.60.0 (d1fd9fe 2022-03-01)
2022-05-04T13:41:11.206591164Z [I 21:41:11.206 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
2022-05-04T13:41:11.280554794Z Rust doesn't support interrupting execution. Perhaps restart kernel?
2022-05-04T13:41:11.640393222Z Error: Failed to read Cargo metadata from Cargo.toml file /tmp/.tmpNRPWhW/Cargo.toml, cargo 1.60.0 (d1fd9fe 2022-03-01)
cargo install --force --git https://github.com/google/evcxr.git evcxr_jupyter
error[E0308]: mismatched types
  --> /root/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/ra_ap_hir_def-0.0.104/src/intern.rs:62:25
   |
62 |             None => Err(shard),
   |                         ^^^^^ expected struct `parking_lot::RawRwLock`, found struct `dashmap::RawRwLock`
   |
   = note: expected struct `lock_api::RwLockWriteGuard<'_, parking_lot::RawRwLock, HashMap<Arc<T>, SharedValue<()>, BuildHasherDefault<FxHasher>>>`
              found struct `lock_api::RwLockWriteGuard<'_, dashmap::RawRwLock, hashbrown::map::HashMap<Arc<T>, SharedValue<()>, BuildHasherDefault<FxHasher>>>`

For more information about this error, try `rustc --explain E0308`.
error: could not compile `ra_ap_hir_def` due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `evcxr_jupyter v0.12.0 (https://github.com/google/evcxr.git#0a117b90)`, intermediate artifacts can be found at `/tmp/cargo-installCvqX7K`

Caused by:
  build failed

Repo

Rust Install Rust Kernel Config

davidlattimore commented 2 years ago

Thanks for the bug report @XRSecAdmin. It looks like some upstream crate has made a breaking change without doing a semver bump. I'll work on a fix. In the meantime, you should be able to get it to install by adding the --locked flag to cargo install.