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

Failure to evaluate build script for anyhow #9198

Closed
neonaot opened this issue Aug 15, 2022 · 2 comments · Fixed by #9235
Closed

Failure to evaluate build script for anyhow #9198

neonaot opened this issue Aug 15, 2022 · 2 comments · Fixed by #9235

Comments

@neonaot
Copy link
Member

neonaot commented Aug 15, 2022

Environment

CLion2022.2
cargo 1.62.1-aarch64-apple-darwin
Rust plugin 0.4.175.4772-222

Originally posted in https://youtrack.jetbrains.com/issue/CPP-30162/Failure-to-evaluate-build-script-for-anyhow

Problem description

Error during syncing:

error[E0554]: `#![feature]` may not be used on the stable release channel
   --> /Users/wrichard/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/anyhow-1.0.61/src/lib.rs:214:32
    |
214 | #![cfg_attr(backtrace, feature(backtrace))]
    |                                ^^^^^^^^^

Expected

Code completion involving include!(concat!(env!("OUT_DIR"), "/bindings.rs")) works

Steps to reproduce

  1. Create a rust project with a dependency on anyhow
  2. Enable evaluate.build.scripts and proc macro expansion
  3. Sync project
@Undin
Copy link
Member

Undin commented Aug 15, 2022

Issue in anyhow: dtolnay/anyhow#260

@Kage-Yami
Copy link

I'm getting the below error on nightly, and I believe it's the same issue, based on: dtolnay/anyhow#254

error[E0407]: method `backtrace` is not a member of trait `StdError`
   --> ~\.cargo\registry\src\github.com-1ecc6299db9ec823\anyhow-1.0.62\src\context.rs:127:5
    |
127 | /     fn backtrace(&self) -> Option<&Backtrace> {
128 | |         self.error.backtrace()
129 | |     }
    | |_____^ not a member of trait `StdError`

(... same for three other locations)

What seems to work is, outside of CLion, is doing a cargo clean followed immediately by cargo build - even syncing and rebuilding within the editor will work as long as that's been done (presumably until something to do with dependencies changes?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants