ISSUE DESCRIPTION LSP doesn't provide completion for interfaces Lisette version: 0.2.11…
- User
ISSUE DESCRIPTION
LSP doesn't provide completion for interfaces Lisette version: 0.2.11 IDE: VSCode and Zed
The LSP isn't providing completions for interfaces from either stdlib or user-defined.
interface Example { fn example(self, name: string) -> string } fn example_call(ex: Example) -> string { ex. }Interface
No new interfaces are introduced.
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use
git checkout <file>to restore the file to its original state. You can also reset all changes in the repository usinggit reset --hardcommand. Additionally, you can usegit stashandgit stash popto temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you callsubmit) usinggit statusorgit diffcommands. However you don't need to usegit addorgit commitbefore submitting your changes. In fact,submitonly submits currently unstaged changes because it usesgit diffto get the changes that need to be submitted.CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
- If an error was reported in the issue description, I have successfully reproduced it.
- If an error was reported in the issue description, I have confirmed that my fix resolves the error.
- I have thought about edge cases and made sure my fix handles them as well.
- I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /lisette, current file: none) bash-$
Assistant
This is a Rust project. Let's find the LSP completion logic.
Assistant
Good, there's a test infra. Let's view completion_dot_on_local_variable test to understand format, then write our own reproduce test/script.
Assistant
Now let's append a temp test to reproduce the interface completion issue.
Assistant
Confirmed reproduction. Now let's apply the fix in completion.rs.
Assistant
Now let's also check
get_type_completions— since interfaces likely don't have static methods, but let's verify similar issue doesn't affect it. Let's rebuild and run the temp test.Assistant
The fix works. Now let's test with parent interfaces and stdlib interfaces to be thorough.
Assistant
Good, syntax is
interface Reader { impl Closable; fn read() -> string; }. Let's fix my temp test.Assistant
Both pass. Now let's test stdlib interface completion (e.g., a common interface from stdlib). Let's check what stdlib interfaces exist.
Assistant
So it's a Go stdlib package too - need
import "go:io". Let's fix test.Assistant
All three scenarios pass. Now let's run the full lsp test suite to make sure nothing else broke.
Assistant
All 472 pass. Now let's run the whole workspace test suite (relevant crates) to make sure nothing else broke, and check clippy/build warnings.
Assistant
No warnings. Now let's remove the temporary tests I added before submitting.
Assistant
My regex removal left stray fragments (multi-line strings confused the greedy pattern matching due to
}inside string literals). Let's revert tests/lsp.rs entirely and redo removal more carefully.Assistant
Good, tests/lsp.rs is back to original (no temp tests, since they weren't committed anyway - checkout removed all my additions). Let's verify.
Assistant
Now only completion.rs has the fix. Let's re-run the temp tests one more time using a standalone script (not committed to repo) to double check, then run the full test suite one final time.
Assistant
All three scenarios still pass. Now restore the original test file and run the full test suite once more to confirm everything else passes.
Assistant
All 469 original tests pass. Now let's run broader workspace tests (semantics, emit, etc.) to be safe, plus check for clippy warnings on modified file.
Assistant
No clippy warnings. Let's view the final diff for review.
Assistant
This looks clean and minimal. Let's now run the full repository test suite (or at least the affected crates) to be thorough.
Assistant
Confirmed: these failures are pre-existing and unrelated to my change (likely missing Go toolchain in this environment). Let's restore my fix.
Assistant
These are pre-existing failures unrelated to my change (confirmed identical failure count with/without my fix, likely due to missing Go toolchain in this environment). Let me clean up the untracked snapshot
.newfiles generated by test runs.Assistant
Clean. Now let's run the lsp-specific test suite one final time to confirm everything is good before submission.
Assistant
All good. Let's do a final review of the diff.
Assistant
This resolves the issue cleanly. Let me go through the checklist:
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.