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

Cannot compile project due error[E0277]: the trait bound CompactStr: Deserialize<'_> is not satisfied #4626

Closed
qarmin opened this issue Aug 4, 2024 · 0 comments
Labels
C-bug Category - Bug

Comments

@qarmin
Copy link

qarmin commented Aug 4, 2024

  wget -q https://github.com/oxc-project/oxc/archive/refs/heads/main.zip
  unzip -q main.zip
  rm main.zip
  cd oxc-main
  rm rust-toolchain.toml
  sd "codegen-units = 1" "overflow-checks = true" Cargo.toml
  sd "debug         = false" "debug = true" Cargo.toml
  
  if [ "true" = "true" ]; then
    echo "ASAN BUILD___"
    RUSTFLAGS="-Zsanitizer=address" cargo +nightly install --path apps/oxlint --locked --target x86_64-unknown-linux-gnu
  else
    echo "NORMAL BUILD___"
    cargo install --path apps/oxlint --locked
  fi
  
  cd ../
  rm -rf oxc-main
  ldd $(whereis -b oxlint | awk '{print $2}')
error[E0277]: the trait bound `CompactStr: Deserialize<'_>` is not satisfied
    --> crates/oxc_linter/src/config/settings/react.rs:45:21
     |
45   |         attributes: Vec<CompactStr>,
     |                     ^^^^^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `CompactStr`, which is required by `std::vec::Vec<CompactStr>: Deserialize<'_>`
     |
     = note: for local types consider adding `#[derive(serde::Deserialize)]` to your `CompactStr` type
     = note: for types from other crates check whether the crate offers a `serde` feature flag
     = help: the following other types implement trait `Deserialize<'de>`:
               &'a [u8]
               &'a std::path::Path
               &'a str
               ()
               (T,)
               (T0, T1)
               (T0, T1, T2)
               (T0, T1, T2, T3)
             and 177 others
     = note: required for `std::vec::Vec<CompactStr>` to implement `Deserialize<'_>`
note: required by a bound in `next_value`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.204/src/de/mod.rs:1872:12
     |
1870 |     fn next_value<V>(&mut self) -> Result<V, Self::Error>
     |        ---------- required by a bound in this associated function
1871 |     where
1872 |         V: Deserialize<'de>,
     |            ^^^^^^^^^^^^^^^^ required by this bound in `MapAccess::next_value`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `oxc_linter` (lib) due to 11 previous errors
error: failed to compile `oxlint v0.6.1 (/home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/apps/oxlint)`, intermediate artifacts can be found at `/home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
@qarmin qarmin added the C-bug Category - Bug label Aug 4, 2024
@Boshen Boshen closed this as completed in 73d2558 Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category - Bug
Projects
None yet
Development

No branches or pull requests

1 participant