Revert "Handle dev-dependency cycles"

This commit is contained in:
Lukas Wirth 2023-04-25 14:29:26 +02:00 committed by GitHub
parent a96bb452a7
commit 10d7d7304b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 52 additions and 1798 deletions

View file

@ -119,9 +119,7 @@ impl SourceToDefCtx<'_, '_> {
pub(super) fn file_to_def(&self, file: FileId) -> SmallVec<[ModuleId; 1]> {
let _p = profile::span("SourceBinder::to_module_def");
let mut mods = SmallVec::new();
// HACK: We iterate in reverse so that dev-dependency duplicated crates appear first in this
// Most code only deals with one module and we want to prefer the test enabled code where possible
for &crate_id in self.db.relevant_crates(file).iter().rev() {
for &crate_id in self.db.relevant_crates(file).iter() {
// FIXME: inner items
let crate_def_map = self.db.crate_def_map(crate_id);
mods.extend(