-
Notifications
You must be signed in to change notification settings - Fork 36
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
Standard file symbol syntax #238
Comments
Questions from @kritzcreek
|
Yes, relative, syntactically normalized (no
We should reuse the prefix bit, but the last bit needs to not match any descriptor. Identifiers cannot be empty, which means that we can maybe we can use some syntax like:
Based on the grammar, I think this syntax would be illegal, because the sequence We retain the
I think having files be referencable in SCIP is a useful concept, and in terms of extra storage, it wouldn't be that much, it's one string per document. So I propose the following: Add two fields to
As part of Document normalization:
Hmm, resolution-wise, I don't think we should need anything special at all (maybe I'm missing something -- do you think this would be necessary?). The extra sauce will be needed in client-side code nav.
Yeah, definitely, agreed. We've added examples in the past in |
Follow-up from @kritzcreek
|
We already have the rules written here. https://github.com/sourcegraph/scip/blob/main/scip.proto#L79-L88 We haven't received any complaints about it so far.
Import statements are generally much fewer than other occurrences in most code (PureScript doesn't count as mainstream 😛). I think we really should not worry about this.
My point was, the "special-ness" of these symbols would be around normalization (which happens during ingestion) mainly, and special affordances needed in the UI. Storage (at rest) and retrieval/lookup (in the backend) should be unaffected because they're "just" symbols. In my mind, "resolution" ~ lookup. Since the storage would be like other symbols, resolution/lookup would also be similar. |
(Converted from Slack thread)
I was thinking maybe we should just go ahead and add a standard "file symbol" syntax to SCIP so that you can emit occurrences which are references to a file rather than some fake occurrence within the file.
For some languages, there are no package declarations at the top of a file, and we want to be able to emit references to files for import statements. In the past, we've relied on hacks, which don't work when the client tries to do something principled. https://github.com/sourcegraph/sourcegraph/issues/59733#issuecomment-1945520000
The text was updated successfully, but these errors were encountered: