Hey all, has anyone noticed that completion with
notify doesn't work at all? I think it's because the actual implementations are hidden behind target_os cfgs. is there any way to set what I want a certain cfg to be for the purposes of rust-analyzer?
ah looks like this is a similar issue: https://github.com/rust-analyzer/rust-analyzer/issues/1527
and looks like this was already discussed here! so nm. :) https://github.com/rust-analyzer/rust-analyzer/issues/1073
we actually completely ignore cfgs currently, so the problem isn't that anything is hidden behind cfgs, but probably some other problem with whatever implementation actually gets chosen
1527 is actually just about the cargo-watch integration
how would an implementation get chosen there then as far as rust-analyzer is concerned? is rust-analyzer considering _all_ of the mods/crates used for something like notify?
yes, basically it's currently considering all the mods, and what gets chosen for e.g. the
RecommendedWatcher type is pretty much random, probably either the first or the last definition
got it :+1:
is there any feature there that's being considered or issue that I can track? want to make sure I'm keeping an eye on the right thing if this is being looked at more.
notify is using some traits, maybe something's not yet working there, although I don't immediately see anything that would explain it
it's interesting it was trying to code complete to locally defined "new" fns that I had elsewhere in the project.
or rather, when I would jump to definition.
so it didn't associate Watcher::new, for example, with the trait's
1073 could probably serve as tracking issue for that, though it might also be about cargo-watch
yeah, it falls back to searching by symbol if it can't resolve the name properly
ahhhh that makes sense
which can be rather annoying for names like
ok good making sure zulip connected my github login with my email. :D