Conditional features limit with rust-analyzer? #20935
-
| Hi, Is there any limit in the number of features supported by rust-analyzer? Thanks in advance rust-analyzer version: 0.3.2660 rustc version: 1.90.0 editor or extension: VSCode 1.105.1 cargo.toml features def: ...
[features]
default = [ "all_features" ]
...utils/mod.rs conditional cfg: #[cfg(any(feature = "all_features", feature = "encoding"))]
pub mod iencoding;Error raised by rust-analyzer: utils/src/datasources/xml_reader.rs:237:54
    |
237 | ...                   Ok(s) => swappables::iencoding::HtmlEntity::get_decoded_str(&s.to_string()),
    |                                            ^^^^^^^^^ could not find `iencoding` in `swappables`
    |
note: found an item that was configured out
   --> utils/src/swappables/mod.rs:63:9
    |
 62 | #[cfg(any(feature = "all_features", feature = "encoding"))]
    |          ------------------------------------------------ the item is gated here
 63 | pub mod iencoding;Wheras running cargo check/test doesn't raise any issue: cargo test flib_utils_xml_reader_10
   Compiling utils v2.0.0 
    Finished `test` profile [unoptimized + debuginfo] target(s) in 1.00s
     Running unittests src/lib.rs (target/debug/deps/utils-ec548358a71e13e2)
running 1 test
test datasources::unit_tests::unit_test::flib_utils_xml_reader_10 ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 75 filtered out; finished in 0.00s | 
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 26 replies
-
| 
 Where does it appear? Output panel on vs-code? | 
Beta Was this translation helpful? Give feedback.
-
| Does running  | 
Beta Was this translation helpful? Give feedback.
-
| What are your rust-analyzer settings? | 
Beta Was this translation helpful? Give feedback.
That's still lacks of some of other flags and env vars. Why on earth do you think they are same?
If the very same command still fails to reproduce the compilation errors, that's probably emitted while checking
utilas a dependency for other crates in your workspace, notutilitself. As running it in rust-analyzer has almost different from running it from your terminal. So, please check other commands in your output log as well.That's the best what I can say about this regarding the given situation.