File B references a methodmap called Foo which should be declared in file A but isn't.
Declare methodmap Foo in file A.
File B is only reparsed when it is modified. The references of methodmap Foo are no synced.
Source deletion 🚩
File B references a methodmap called Foo which is declared in file A.
Delete the declaration of the Foo methodmap.
The references are deleted with the object, the references of methodmap Foo are synced.
The missing references are not reported.
Reference creation ✔️
Methodmap Foo is declared in file A.
File B is edited and references Foo.
The references are updated in the semantic analysis, the references of methodmap Foo are synced.
Reference deletion ✔️
Methodmap Foo is declared in file A and is referenced in file B.
File B is edited and no longer references Foo.
The references are updated in the semantic analysis by purge_references, the references of methodmap Foo are synced.
Potential fix
Greedy approach
Mark the file as "missing resolutions" and whenever a file is edited, reparse all files which are marked as "missing resolutions".
This will add a lot of unnecessary computations. Needs some testing. Doing it on saves only might be more reasonable.
Lazy approach
Keep a hashset of the non-resolved tokens. If one of the top level tokens of file B is in the hashset of file A, trigger a reparse.
Maybe keep the scope in a hashmap to resume the semantic analysis rather than starting from zero.
Description
Source creation 🚩
Foo
which should be declared in file A but isn't.Foo
in file A.Foo
are no synced.Source deletion 🚩
Foo
which is declared in file A.Foo
methodmap.Foo
are synced.Reference creation ✔️
Foo
is declared in file A.Foo
.Foo
are synced.Reference deletion ✔️
Foo
is declared in file A and is referenced in file B.Foo
.purge_references
, the references of methodmapFoo
are synced.Potential fix
Greedy approach
Mark the file as "missing resolutions" and whenever a file is edited, reparse all files which are marked as "missing resolutions". This will add a lot of unnecessary computations. Needs some testing. Doing it on saves only might be more reasonable.
Lazy approach
Keep a hashset of the non-resolved tokens. If one of the top level tokens of file B is in the hashset of file A, trigger a reparse. Maybe keep the scope in a hashmap to resume the semantic analysis rather than starting from zero.