-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index documents on modification #2941
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
41cc250
to
826bd1a
Compare
826bd1a
to
2251c9d
Compare
Nice! I did notice an issue while testing: module Bar
def abc
end
end
class Foo
extend Bar
end
Foo.abc If you remove the |
2251c9d
to
e5b8c20
Compare
@andyw8 good catch. I updated the code to handle ancestor invalidation too. |
e5b8c20
to
41fc7d4
Compare
Let's also update the docs to remove the part that begins "There is currently a technical limitation that code is only indexed when saved." |
41fc7d4
to
d03faf8
Compare
Merge activity
|
…es (#3030) ### Motivation One more bug fix to include in the next release 😅. In #2941, we started indexing unsaved files. However, we didn't fix the requests that were assuming the presence of a file path in entries with `T.must`. We need to handle the possibility of there not being a file path, so that we can account for entries in unsaved files. ### Implementation Fixed all of the occurrences I could find where we assumed the file path to be there. ### Automated Tests Added tests that reproduce each one of the bugs.
Motivation
Closes #1908
This PR starts indexing files upon modification in addition to on saves.
Implementation
The idea is to use the declaration listener together with all of the other listeners, so that we collect declaration changes within the same AST traversal. This allows us to catch any declaration modifications made before saving a file.
The biggest concern with this change is performance, but I think the next PR in this stack is doing a decent job at minimizing reindexes.
Automated Tests
Added tests.