codeintel: Make codenav results more consistent#54410
Conversation
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff a59fd1e...1efc145.
|
|
Codenotify: Notifying subscribers in OWNERS files for diff a59fd1e...1efc145. No notifications. |
Strum355
left a comment
There was a problem hiding this comment.
Fixes a bug with implementations/prototypes i found with scip-go ![]()
|
@olafurpg could you test whether this branch fixes https://github.com/sourcegraph/sourcegraph/issues/50927 ? |
a712289 to
de6aeb8
Compare
|
Confirming that this https://github.com/sourcegraph/sourcegraph/issues/52132 is fixed by this PR |
|
I'm able to reproduce the following unexpected behavior where "Implementations" and "Prototypes" show the same symbol I ran To reproduce, open URL https://sourcegraph.test:3443/github.com/sourcegraph/scip-java@a6a169f3012131c4b4b7242f1e72982fee669a48/-/blob/tests/minimized/src/main/java/minimized/SubClasses.java?L6:17-6:39#tab=implementations_java I built the index with I can reproduce the same behavior with scip-typescript in the sourcegraph/sourcegraph repository at the URL https://sourcegraph.test:3443/github.com/sourcegraph/sourcegraph@de6aeb8b9f3092a9b5c205e169e5ca1e9ca577a2/-/blob/client/web/src/fuzzyFinder/CaseInsensitiveFuzzySearch.ts?L32:12-32:18#tab=implementations_typescript I suspect the underlying reason is because these symbols have |
|
@olafurpg Pushed a fix to implementations - can you take another look? |
| tags = [ | ||
| "manual", | ||
| ], |
There was a problem hiding this comment.
cc @jhchabran and/or @sourcegraph/dev-experience What is the proper way to turn this test back on? This should solve the flakiness we have been seeing and should re-enable it.
Being practical I'd also like an escape switch to pull to put it back to warn or silent mode in case something else is the real/another culprit.
There was a problem hiding this comment.
We have been running it on main explicitly. Removing the manual tag here would make it run as part of //... ie. all targets (excluding manual) and therefore on main and PRs.
I think we should keep the tag and perhaps remove flaky = True. From Bazel docs
If set, executes the test up to three times, marking it as failed only if it fails each time. By default, this attribute is set to False and the test is executed only once. Note, that use of this attribute is generally discouraged - tests should pass reliably when their assertions are upheld.
|
@efritz I can confirm the issue I reported has been fixed. I ran a few more tests and didn't identify any surprising behavior. This PR is a huge improvement. Thank you for fixing this! 🙏🏻 |
|
Hmm, I'm not having success with this PR with commit b9bfe15. With this PR: On Sourcegraph.com below: The correct result should be 100+ implementations (subclasses) and 0 prototypes (superclasses) Index information: Compressed index file: https://drive.google.com/file/d/16j76Qiigsb_mZ5u4s4Bd-XoFP4412B92/view?usp=sharing |
|
Also, can you perhaps tweak the PR title and/or the information in the description? Right now, as it stands, it's very non-obvious that this PR is meant to fix a bunch of bugs related to Find Implementations. |
|
@varungandhi-src Running locally I got this: 🤔🤔🤔 |
|
@efritz Along with the index uploaded earlier, also upload this index at an older commit: https://drive.google.com/file/d/1EtLCtzPw3ur95BpQ2sfjpfIGA3wI8AHp/view?usp=sharing Invocation: It looks like the implementations at the newer commit ( |
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-5.1 5.1
# Navigate to the new working tree
cd .worktrees/backport-5.1
# Create a new branch
git switch --create backport-54410-to-5.1
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0889c891dbb49f176e5f8f51c832a91dabfbd95d
# Push it to GitHub
git push --set-upstream origin backport-54410-to-5.1
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-5.1Then, create a pull request where the |
(cherry picked from commit 0889c89)
Expose new methods from #53710 in GraphQL layer. This should make prototype/implementation operations more consistent with how we resolve definitions and references, and should in the process actually return correct results.
Test plan
Updated integration tests.