Skip to content
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

Incremental Updates to LSIF #120

Open
brianshih1 opened this issue Jan 24, 2021 · 5 comments
Open

Incremental Updates to LSIF #120

brianshih1 opened this issue Jan 24, 2021 · 5 comments
Labels
feature-request Request for new features or functionality
Milestone

Comments

@brianshih1
Copy link

I am still pretty new to the repo and others have probably brought this up already, but how hard would it be to incrementally update the constructed LSIF graph? Currently I only see an lsif function that seems to visit the entire program each time.

@dbaeumer
Copy link
Member

What already exists is updating a single project that is part of a larger repository with many projects. No work has started though to update a single project graph incrementally on a file scope.

@dbaeumer dbaeumer added the feature-request Request for new features or functionality label Jan 25, 2021
@dbaeumer dbaeumer added this to the Backlog milestone Jan 25, 2021
@brianshih1
Copy link
Author

@dbaeumer Ahh I see, thanks! Also not sure if you've thought a bit about how difficult it would be to update a single project graph incrementally on a file scope, but if I were to do it on my own implementation of LSIF, what might be some tricky aspects and things to consider about?

@dbaeumer
Copy link
Member

The TS compiler has an option for incremental update. So we would need to leverage this and store the TS compiler build state somewhere.

@brianshih1
Copy link
Author

brianshih1 commented Jan 26, 2021

@dbaeumer Just curious, what would the final LSIF graph after the incremental update look like? Would we remove all vertices marked by the document begin event vertex and the document end event vertex and just use the same emitter to keep appending vertices to the graph with higher and higher id?

@dbaeumer
Copy link
Member

dbaeumer commented Feb 2, 2021

IMO the final graph should only contain the delta to the old graph with their own ids. The tool that imports it into a DB would be responsible to merge these with the original graph based on file names, monikers, ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants