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

Question: Indexmap and CLion #148

Closed
PierreHenry63 opened this issue Aug 9, 2020 · 6 comments
Closed

Question: Indexmap and CLion #148

PierreHenry63 opened this issue Aug 9, 2020 · 6 comments
Labels

Comments

@PierreHenry63
Copy link

Hello,

Thanks for the excellent crate!

I have one question related to the usage of the crate with JetBrains CLion. Somehow the intellisense doesn't work very nicely with it, and the IDE doesn't recognise the output types of functions such as IndexMap::get(). Is there anything that can be done to improve that experience?

Thanks a lot

@cuviper
Copy link
Member

cuviper commented Aug 9, 2020

I suspect this is probably failing because the IDE doesn't have the has_std flag from running our build script, which then disables anything that needs the default S = RandomState, including IndexMap::new. I ran into this with rust-analyzer myself, reported in rust-lang/rust-analyzer#5353. They have a loadOutDirsFromCheck option to get those build script flags, so maybe JetBrains CLion has something similar?

This seems like another vote for an explicit "std" feature (#145), and cc #135 for 2.0 considerations.

@aschmolck
Copy link

Any update on this? I've changed some code to use IndexMap for a core data structure, and it basically completely breaks IDE functionality. I've added "std" explicitly to features in Cargo.toml (as per linked bug #145), but that seems to have no effect, anything that I get out of an IndexMap is a complete mystery to the IDE.

@cuviper
Copy link
Member

cuviper commented Jun 4, 2021

It works for me with Vim and rust-analyzer, but I don't have CLion to try. Can you ask JetBrains for support?

@aschmolck
Copy link

Thanks -- I will try vim and/or vscode and if the problem is Jetbrains specific file a bug with the Jetbrains Rust plugin.

@bluss
Copy link
Member

bluss commented Jun 19, 2021

In a way, this is "not an indexmap bug", but it's clear that our usage of autocfg has multiple issues as downside and this should inform our 2.0 version (to not use the same solution for the 'std' flag).

@bluss bluss added the question label Nov 21, 2021
@bluss
Copy link
Member

bluss commented Nov 21, 2021

We're taking the std change as a necessary one, from this issue (among others).

@bluss bluss closed this as completed Nov 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants