Skip to content

Commit

Permalink
Find imports by import path instead of module name.
Browse files Browse the repository at this point in the history
  • Loading branch information
toinehartman committed Nov 26, 2024
1 parent 809c8e6 commit 2ead41e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,11 @@ DefsUsesRenames rascalGetDefsUses(WorkspaceInfo ws, cursor(moduleName(), cursorL
set[loc] defs = {ms | ms <- getModuleScopes(ws), ms.top == moduleFile};
imports = {u | u <- ws.useDef<0>, amodule(cursorName) := ws.facts[u]};
rel[loc fromFile, loc toFile] modulePaths = toRel(getModuleScopePerFile(ws)) o rascalGetTransitiveReflexiveModulePaths(ws);
set[loc] importUses = {u
| <loc u, Define _: <_, _, _, moduleId(), d, _>> <- ws.useDef o definitionsRel(ws)
, <u.top, d> in modulePaths
};
rel[loc file, loc use] qualifiedUseCandidates = {
<u.top, u>
Expand Down

0 comments on commit 2ead41e

Please sign in to comment.