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

Support mode where only the root of a project tree is dumped and not it referenced projects #37

Open
dbaeumer opened this issue May 21, 2019 · 4 comments
Labels
feature-request Request for new features or functionality
Milestone

Comments

@dbaeumer
Copy link
Member

The vertex in question:

{"id":3,"type":"vertex","label":"document","uri":"file:///c:/Users/dirkb/Projects/mseng/VSCode/lsif-node/samples/typescript-ref/shared/src/provide.ts","languageId":"typescript","contents":"ZXhwb3J0IGZ1bmN0aW9uIGFkZChhOiBudW1iZXIsIGI6IG51bWJlcik6IG51bWJlciB7DQoJcmV0dXJuIGEgKyBiOw0KfQ=="}
@dbaeumer dbaeumer added the bug Issue identified by VS Code Team member as probable bug label May 21, 2019
@dbaeumer
Copy link
Member Author

Actually the dump is OK since the lsif-tsc create the information for the client project and the shared project, since the client depends on shared. If you look at how the client code depends on shared then you see that the dependency is correctly made to the provide.d.ts. The corresponding vertex is:

{"id":64,"type":"vertex","label":"document","uri":"file:///c:/Users/dirkb/Projects/mseng/VSCode/lsif-node/samples/typescript-ref/shared/out/provide.d.ts","languageId":"typescript","contents":"ZXhwb3J0IGRlY2xhcmUgZnVuY3Rpb24gYWRkKGE6IG51bWJlciwgYjogbnVtYmVyKTogbnVtYmVyOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9cHJvdmlkZS5kLnRzLm1hcA=="}

The dump also correctly contains two moniker definitions for the provider#add method. These are for the src/provide.ts in shared

{"id":49,"type":"vertex","label":"moniker","kind":"export","scheme":"tsc","identifier":"../shared/out/provide:add"}
{"id":50,"type":"edge","label":"moniker","outV":10,"inV":49}

and these for out/provide.d.ts referenced from client

{"id":158,"type":"vertex","label":"moniker","kind":"import","scheme":"tsc","identifier":"../shared/out/provide:add"}
{"id":159,"type":"edge","label":"moniker","outV":156,"inV":158}

So I think what is missing is that we provide a mode for the lsif-tsc tool to only dump the active / root project and not its dependent projects.

@dbaeumer
Copy link
Member Author

@BertanAygun See my comments above.

@dbaeumer dbaeumer added feature-request Request for new features or functionality and removed bug Issue identified by VS Code Team member as probable bug labels May 21, 2019
@BertanAygun
Copy link
Member

I agree having such a switch would be great in LSIF tools since knowing if a file actually belongs to a project or not may be something LSIF tool caller does not about since it would be language specific information.

Ideally, LSIF output involving multiple projects would actually be distinct trees only joined by moniker vertices. Although I understand that there are some cases where files are shared such as 2 projects importing the same code file by path reference instead of project reference.

@dbaeumer dbaeumer changed the title typescript-ref sample: client code reaches into shared/src instead of shared/out Support mode where only the root of a project tree is dumped and not it referenced projects May 24, 2019
@dbaeumer
Copy link
Member Author

OK. I updated the title accordingly.

@dbaeumer dbaeumer added this to the Next milestone Oct 28, 2020
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