-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Qualify public, unexported bindings in REPL help #52524
Conversation
I'm not sure how hard it'll be, but suggesting public but unexported names will be really helpful. This may be a separate PR though |
I had a go at it here in a separate commit. |
Example from #52472 (screenshot rather than code copy-paste to show that highlighting is still working as expected): |
@testset "search prioritizes exported names" begin | ||
# Prioritize exported/local names if they exactly match | ||
lines = helplines("dango") | ||
@test startswith(lines[1], "search: dango TestSuggestPublic.dango dingo") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly, this test fails on some platforms and works on others. 🤔 It works for me locally on macOS ARM but fails on macOS ARM CI. It also fails on Linux x86_64 but works on macOS and FreeBSD x86_64. I have not the slightest idea why that could happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vtjnash, any idea why this might be different across platforms?
Fixes 52472, which was caused by `names` being changed to also return public, unexported symbols.
56d26fd
to
e479b4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
Looks like the sort order seems arbitrary, since the first 2 have the same name?
|
Part of the implementation aims to disambiguate by adjusting the edit distance so that one case is always sorted before the other but perhaps it was not implemented correctly. |
I am not sure where |
Certainly possible, though if they did then I would have expected these tests to fail: https://github.com/JuliaLang/julia/pull/52524/files#diff-c16f754f85cbf6a46764e56fb6572adf5e13692d753d561d21df8a07b14b8b39R60-R65 |
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Only ":windows: build x86_64-w64-mingw32" failed: (git error)
LGTM? |
Fixes #52472, which was caused by
names
being changed to also return public, unexported symbols in #50105. Note that this restores previous behavior. A case could be made to instead add the public, unexported bindings as suggestions with the appropriate qualification.Not entirely sure how to test this so I'd welcome any suggestions.