Open Xanewok opened 7 years ago
Do you have a test case that can reproduce this? I'm a bit concerned that we might forget about this, but it doesn't seem very actionable at the moment.
IIRC you could theoretically, when analyzing a bin/lib project:
cfg_test = false
and build_lib = false
cfg_test = true
cfg
)I'll have to check again and can get back with a simple repro.
Currently the problem only affects a simple bin/lib project scenario, but I think it's more general than that. Since the
cfg_test
switch is only on RLS side, when we change it and request complete analysis at startup from Cargo, it doesn't see any expected change in behaviour (presumably because target fingerprint is unchanged?) and uses previously compiled dependencies (with oldcfg_set
setting for compilation), which may lead to weird analysis inconsistencies when compiling final crate type.