polkadot-evm / frontier

Ethereum compatibility layer for Substrate.
Apache License 2.0
568 stars 481 forks source link

error on rust analyzer #709

Closed kulame closed 7 months ago

kulame commented 2 years ago

Description i try to use rust analyzer && vscode to run frontier project. it cause error on master branch.

[ERROR rust_analyzer::lsp_utils] rust-analyzer failed to run build scripts

error: failed to run custom build command for `frontier-template-runtime v0.0.0 (/opt/frontier/template/runtime)`

Caused by:
  process didn't exit successfully: `/opt/frontier/target/debug/build/frontier-template-runtime-090f3a2d6bb6cc99/build-script-build` (exit status: 1)
  --- stdout
  Information that should be included in a bug report.
  Executing build command: "/home/kula/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo" "rustc" "--target=wasm32-unknown-unknown" "--manifest-path=/opt/frontier/target/debug/wbuild/frontier-template-runtime/Cargo.toml" "--color=always" "--profile" "release"
  Using rustc version: rustc 1.63.0-nightly (e71440575 2022-06-02)

  --- stderr
     Compiling frontier-template-runtime v0.0.0 (/opt/frontier/template/runtime)
  error[E0201]: duplicate definitions with name `OnTimestampSet`:
     --> /opt/frontier/template/runtime/src/lib.rs:258:2
      |
  256 |     type OnTimestampSet = Aura;
      |     --------------------------- previous definition of `OnTimestampSet` here
  257 |     #[cfg(feature = "manual-seal")]
  258 |     type OnTimestampSet = ();
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definition

  For more information about this error, try `rustc --explain E0201`.
  error: could not compile `frontier-template-runtime` due to previous error

thread '<unnamed>' panicked at 'overflow depth reached', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/chalk-recursive-0.82.0/src/fixed_point/stack.rs:51:13
stack backtrace:
   0: std::panicking::begin_panic
   1: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
   2: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
   3: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
   4: chalk_recursive::solve::SolveIteration::solve_iteration
   5: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
   6: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
   7: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
   8: chalk_recursive::solve::SolveIteration::solve_iteration
   9: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  10: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  11: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  12: chalk_recursive::solve::SolveIteration::solve_iteration
  13: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  14: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  15: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  16: chalk_recursive::solve::SolveIteration::solve_iteration
  17: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  18: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  19: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  20: chalk_recursive::solve::SolveIteration::solve_iteration
  21: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  22: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  23: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  24: chalk_recursive::solve::SolveIteration::solve_iteration
  25: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  26: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  27: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  28: chalk_recursive::solve::SolveIteration::solve_iteration
  29: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  30: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  31: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  32: chalk_recursive::solve::SolveIteration::solve_iteration
  33: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  34: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  35: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  36: chalk_recursive::solve::SolveIteration::solve_iteration
  37: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  38: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  39: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  40: chalk_recursive::solve::SolveIteration::solve_iteration
  41: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  42: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  43: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  44: chalk_recursive::solve::SolveIteration::solve_iteration
  45: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  46: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  47: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  48: chalk_recursive::solve::SolveIteration::solve_iteration
  49: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  50: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  51: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  52: chalk_recursive::solve::SolveIteration::solve_iteration
  53: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  54: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  55: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  56: chalk_recursive::solve::SolveIteration::solve_iteration
  57: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  58: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  59: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  60: chalk_recursive::solve::SolveIteration::solve_iteration
  61: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  62: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  63: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  64: chalk_recursive::solve::SolveIteration::solve_iteration
  65: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  66: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  67: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  68: chalk_recursive::solve::SolveIteration::solve_iteration
  69: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  70: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  71: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  72: chalk_recursive::solve::SolveIteration::solve_iteration
  73: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  74: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  75: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  76: chalk_recursive::solve::SolveIteration::solve_iteration
  77: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  78: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  79: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  80: chalk_recursive::solve::SolveIteration::solve_iteration
  81: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  82: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  83: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  84: chalk_recursive::solve::SolveIteration::solve_iteration
  85: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  86: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  87: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
  88: chalk_recursive::solve::SolveIteration::solve_iteration
  89: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  90: chalk_recursive::fulfill::Fulfill<I,Solver>::prove
  91: chalk_recursive::fulfill::Fulfill<I,Solver>::solve
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[ERROR rust_analyzer::lsp_utils] rust-analyzer failed to run build scripts

error: failed to run custom build command for `frontier-template-runtime v0.0.0 (/opt/frontier/template/runtime)`

Caused by:
  process didn't exit successfully: `/opt/frontier/target/debug/build/frontier-template-runtime-090f3a2d6bb6cc99/build-script-build` (exit status: 1)
  --- stdout
  Information that should be included in a bug report.
  Executing build command: "/home/kula/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo" "rustc" "--target=wasm32-unknown-unknown" "--manifest-path=/opt/frontier/target/debug/wbuild/frontier-template-runtime/Cargo.toml" "--color=always" "--profile" "release"
  Using rustc version: rustc 1.63.0-nightly (e71440575 2022-06-02)

  --- stderr
     Compiling frontier-template-runtime v0.0.0 (/opt/frontier/template/runtime)
  error[E0201]: duplicate definitions with name `OnTimestampSet`:
     --> /opt/frontier/template/runtime/src/lib.rs:258:2
      |
  256 |     type OnTimestampSet = Aura;
      |     --------------------------- previous definition of `OnTimestampSet` here
  257 |     #[cfg(feature = "manual-seal")]
  258 |     type OnTimestampSet = ();
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definition

  For more information about this error, try `rustc --explain E0201`.
  error: could not compile `frontier-template-runtime` due to previous error

memory allocation of 139721273604672 bytes failed
[ERROR rust_analyzer::reload] proc macro server crashed: server exited
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
AurevoirXavier commented 2 years ago

This is a bug of RA.

zees-dev commented 2 years ago

Any way to get around this?

boundless-forest commented 7 months ago

This issue has disappeared today(2024-02-20), it works fine for me. So I close it.