Relative constants from included modules are predicted as absolute references
Open
Nobody has claimed this yet.
bug
help-wanted
non-vscode
pinned
- Dominant language
- Ruby
- Stars
- 2k
- Forks
- 281
- Avg merge
- 2h 14m
- Merged PRs (30d)
- 6
Description
Description
After #2579 was fixed, relative constants are now predicted, but they are only predicted in their absolute form not in their relative form.
module Foo
Bar = 1
end
class Baz
include Foo
B # triggers the absolute `Foo::Bar` completion when it should suggest just the relative `Bar`
end
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Ruby reproducer in the issue and trace the constant-completion behavior changed by #2579. Verify the completion result inside a class that includes a module: the suggested constant should be relative (Bar) rather than absolute (Foo::Bar).
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100