Provide better error hint when UndefVarError results from name clashes#53469
Merged
IanButterworth merged 4 commits intoJuliaLang:masterfrom Mar 3, 2024
Merged
Conversation
vtjnash
reviewed
Feb 26, 2024
vtjnash
reviewed
Feb 26, 2024
Member
vtjnash
left a comment
There was a problem hiding this comment.
I am okay with this internal package relying on an implementation detail here for this purpose. So looks great to me
Member
|
This is great; it's very nice to have a more specific error for this. |
vtjnash
reviewed
Feb 27, 2024
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
ararslan
reviewed
Feb 27, 2024
ericphanson
commented
Feb 28, 2024
Co-authored-by: Alex Arslan <ararslan@comcast.net>
Contributor
Author
|
whitespace check failed with |
Member
|
Seemed like a widespread agent failure, so I restarted those. We can merge when that finishes running (or we could do it sooner, but there is not really any reason to bypass CI). |
tecosaur
pushed a commit
to tecosaur/julia
that referenced
this pull request
Mar 4, 2024
…hes (JuliaLang#53469) We can detect this since we set the `usingfailed` bit when the clash occurs (to avoid printing the `WARNING` multiple times). In this case, typos or missing imports (the current message) isn't quite as clear as it could be, because in fact the name is probably spelled totally right, it's just that there is a missing explicit import or the name should be qualified. This code will stop working if we change the flags in `Core.Binding`, but the test I added should catch that. However if REPL is supposed to be independent of Base and not depend on internals there, there could be an issue. In that case we should probably add an API to Base to inspect this `usingfailed` bit so we can use it in the REPL. --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com> Co-authored-by: Alex Arslan <ararslan@comcast.net>
mkitti
pushed a commit
to mkitti/julia
that referenced
this pull request
Apr 13, 2024
…hes (JuliaLang#53469) We can detect this since we set the `usingfailed` bit when the clash occurs (to avoid printing the `WARNING` multiple times). In this case, typos or missing imports (the current message) isn't quite as clear as it could be, because in fact the name is probably spelled totally right, it's just that there is a missing explicit import or the name should be qualified. This code will stop working if we change the flags in `Core.Binding`, but the test I added should catch that. However if REPL is supposed to be independent of Base and not depend on internals there, there could be an issue. In that case we should probably add an API to Base to inspect this `usingfailed` bit so we can use it in the REPL. --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com> Co-authored-by: Alex Arslan <ararslan@comcast.net>
Member
|
Backporting this so we can backport #56103 too |
IanButterworth
pushed a commit
that referenced
this pull request
Oct 10, 2024
…hes (#53469) We can detect this since we set the `usingfailed` bit when the clash occurs (to avoid printing the `WARNING` multiple times). In this case, typos or missing imports (the current message) isn't quite as clear as it could be, because in fact the name is probably spelled totally right, it's just that there is a missing explicit import or the name should be qualified. This code will stop working if we change the flags in `Core.Binding`, but the test I added should catch that. However if REPL is supposed to be independent of Base and not depend on internals there, there could be an issue. In that case we should probably add an API to Base to inspect this `usingfailed` bit so we can use it in the REPL. --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com> Co-authored-by: Alex Arslan <ararslan@comcast.net> (cherry picked from commit 0f902bf)
This was referenced Oct 10, 2024
Merged
KristofferC
added a commit
that referenced
this pull request
Oct 15, 2024
Backported PRs: - [x] #55945 <!-- Fix logic in `?` docstring example --> - [x] #55932 <!-- REPL: make UndefVarError aware of imported modules --> - [x] #55968 <!-- [build] avoid libedit linkage and align libccalllazy* SONAMEs --> - [x] #55977 <!-- fix comma logic in time_print --> - [x] #55982 <!-- `@time` actually fix time report commas & add tests --> - [x] #55743 <!-- doc: heap snapshot viewing --> - [x] #55851 <!-- [REPL] Fix #55850 by using `safe_realpath` instead of `abspath` in `projname` --> - [x] #55992 <!-- Avoid `stat`-ing stdlib path if it's unreadable --> - [x] #55589 <!-- prevent loading other extensions when precompiling an extension --> - [x] #54009 <!-- allow extensions to trigger from packages in [deps] --> - [x] #56019 <!-- Fix no-arg `ScopedValues.@with` within a scope --> - [x] #56023 <!-- Sockets: Warn when local network access not granted. --> - [x] #55569 <!-- Add a docs section about loading/precomp/ttfx time tuning --> - [x] #55824 <!-- Replace regex package module checks with actual code checks --> - [x] #56041 <!-- Don't show keymap `@error` for hints --> - [x] #53469 - [x] #56029 <!-- fix `_growbeg!` unncessary resizing --> - [x] #56103 - [x] #55941 <!-- Fix zero elements for block-matrix kron involving Diagonal -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We can detect this since we set the
usingfailedbit when the clash occurs (to avoid printing theWARNINGmultiple times). In this case, typos or missing imports (the current message) isn't quite as clear as it could be, because in fact the name is probably spelled totally right, it's just that there is a missing explicit import or the name should be qualified.This code will stop working if we change the flags in
Core.Binding, but the test I added should catch that. However if REPL is supposed to be independent of Base and not depend on internals there, there could be an issue. In that case we should probably add an API to Base to inspect thisusingfailedbit so we can use it in the REPL.