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
Allow references to be marked as imprecise #1174
Comments
I like the first idea. |
@francisschmaltz I'll just find a place to add a badge to these reference results (idea 1 above) unless you have any better ideas. |
We should replace the repo badge with this icon if the match is from basic-code-intel: |
That solution alone doesn't work well, because we don't want to special-case a single extension (basic-code-intel). |
PR at #1627 |
This lets extensions' location providers (definition/reference/etc. providers) associate context data with each location, and also contribute actions that are shown selectively in the file title for location matches shown in the panel. Together, these new features allow the basic-code-intel extension to add "Fuzzy" badges to defs/refs in the panel. This fixes #1174. It would also enable things like: - Showing a "source" badge on cross-repository reference results explaining how the reference was found (eg by looking up dependents on npm) - Showing the type of reference (eg denoting some references as "Assignments", some as "Calls", some as "References", etc.) - Adding an action to "hide" or "always ignore" the reference - Adding an action to add the match to a saved list - Adding an action for users to say "This was useful" or "This was not useful" (eg for a code examples extension) See sourcegraph/code-intel-extensions#10 for an example of how extensions can use this new API.
Is this release blocking for 3.0? |
No |
This lets extensions' location providers (definition/reference/etc. providers) associate context data with each location, and also contribute actions that are shown selectively in the file title for location matches shown in the panel. Together, these new features allow the basic-code-intel extension to add "Fuzzy" badges to defs/refs in the panel. This fixes #1174. It would also enable things like: - Showing a "source" badge on cross-repository reference results explaining how the reference was found (eg by looking up dependents on npm) - Showing the type of reference (eg denoting some references as "Assignments", some as "Calls", some as "References", etc.) - Adding an action to "hide" or "always ignore" the reference - Adding an action to add the match to a saved list - Adding an action for users to say "This was useful" or "This was not useful" (eg for a code examples extension) See sourcegraph/code-intel-extensions#10 for an example of how extensions can use this new API.
I am postponing the fix for this issue (#1627) until 3.1. Because it is postponed, some users may be confused if all of the following are true:
In this case, they will need to toggle the "Show/hide fuzzy refs" button if they want to see only precise refs. I will document this. This is less of a problem for self-hosted instance users than Sourcegraph.com users because self-hosted instance users:
So overall it is still a big win to ship basic-code-intel even without this issue addressed. |
@lguychard I saw you moved this from 3.1 to 3.0. I am assuming that was a mistake, and I moved it back to 3.1. I don't know if this will be a priority for 3.1, but we can triage it together soon and will have more feedback from users to help us decide. |
Moving to backlog. Will monitor user feedback and bump this up in priority as needed. |
Discussed with @sqs:
|
@chrismwendt reassigning to you since you'll be working on this |
@lguychard Ah, thanks! I've been looking for this issue. Linking to #2452 |
Should this be moved into the 3.2 milestone? |
@nicksnyder Yup, moved. |
Now that basic code intel has been split into N language extensions, showing the badge at the file header level is OK. You'll never see mixed fuzzy + precise results. That means #1627 will probably solve this issue. I'll optimistically pick that up and work on it until someone chimes in. |
Resolved by adding an "Imprecise results" action item in the references panel sourcegraph/code-intel-extensions#41 |
There are many useful things that are like "references" but that are not precise: our current basic-code-intel extension, #981, cross-repo references that may take shortcuts to be imprecise, etc.
To support these without violating users' reasonable expectation that "references" means precise, it would be valuable to have a way to display imprecise references and communicate the imprecision clearly to the user.
Strawman ideas:
cc @tsenart
The text was updated successfully, but these errors were encountered: