-
Notifications
You must be signed in to change notification settings - Fork 25
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
Duplicate symbols (same symbol name across different symbols) in generated index #160
Comments
@varungandhi-src is there a change this is a bug in the indexer? |
@ofeki-neosec it seems quite likely that it is a bug, I would expect at least the module name to be present in the symbol name, if not the full qualified module path. |
@varungandhi-src would you recommend trying to upgrade the underlying Pyright package to see if it solves the issue? Thanks in advance! |
After almost creating a PR with the merge of the latest Pyright version, I've noticed a critical function was missing in the new version of Pyright (indexWorkspace - the function that actually indexes the workspace). Upon further investigation, I've found out that Microsoft decided to split Pyright into two projects - Pyright and Pylance. Pyright is still open source but it doesn't have the indexing capability. Pylance has the indexing capability and other features, but it's closed-source and intended to be used within Microsoft's products only. @varungandhi-src do you have any suggestions on how to troubleshoot the issue or any next steps? |
Just saw this happening in another project I indexed. There were four instances of |
It seems like in some cases the indexer binary would name two different symbols in the same exact symbol name.
I have some symbols in the code that are defined in different files using the same code (due to coding conventions).
For example:
or
In both files.
For some reason, the created index file contains a symbol block with an identical symbol for both files, without any differentiation of both symbols. This makes resolving references impossible since there's no way to know which symbol is being referenced in the code.
Examples for the resolved symbols:
I'm running Python 3.12.6 and I'm pointing the indexer to an empty scip-python.json file (
[]
) if that matters.Is there any way it can be solved through #156 ?
The text was updated successfully, but these errors were encountered: