-
-
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
Add way to get module of variable from an UndefVarError #25263
Comments
Again please do not double post. Discourse is meant for questions like this and by double posting you are sending everyone two emails. |
I agree - don’t double post. But this one seems like a good idea, and probably not bad as a first PR. |
Won't double post in the future. The reason for this one though is because:
Is this not a correct workflow? (i.e. avoid making issues on github as long as possible. but do so once you realize it's the way to go?) |
Also @vtjnash, what spec should I build this under? Do you add a // or do you just store the module object directly? |
Also probably just slow for the holidays. This could have been opened straight as a feature request on github. Posting an update on Discourse to say that you had turned it into an issue would also be good (to try to avoid splitting any discussion, and avoid the appearance of double posting). I recommend just storing the Module reference directly in a new field (and leave it uninitialized for local variables - or better yet store the Method) |
+1 to what vtjnash said, and I'll add that I mostly read github issues so I'm more likely to see things here. I will never tell anybody not to open a github issue --- if an issue is inappropriate for whatever reason it is very quick and easy to close one. |
Record the 'scope' of the variable that was undefined (the Module, or a descriptive word such as :local or :static_parameter). Add that scope to the error message, and expand the hint suggestions added by the REPL to include more specific advice on common mistakes: - forgetting to set an initial value - forgetting to import a global - creating a local of the same name as a global - not matching a static parameter in a signature subtype Fixes #17062 (although more could probably be done to search for typos using REPL.string_distance and getting the method from stacktrace) Fixes #18877 Fixes #25263 Fixes #35126 Fixes #39280 Fixes #41728 Fixes #48731 Fixes #49917 Fixes #50369
Record the 'scope' of the variable that was undefined (the Module, or a descriptive word such as :local or :static_parameter). Add that scope to the error message, and expand the hint suggestions added by the REPL to include more specific advice on common mistakes: - forgetting to set an initial value - forgetting to import a global - creating a local of the same name as a global - not matching a static parameter in a signature subtype Fixes #17062 (although more could probably be done to search for typos using REPL.string_distance and getting the method from stacktrace) Fixes #18877 Fixes #25263 Fixes #35126 Fixes #39280 Fixes #41728 Fixes #48731 Fixes #49917 Fixes #50369
Record the 'scope' of the variable that was undefined (the Module, or a descriptive word such as :local or :static_parameter). Add that scope to the error message, and expand the hint suggestions added by the REPL to include more specific advice on common mistakes: - forgetting to set an initial value - forgetting to import a global - creating a local of the same name as a global - not matching a static parameter in a signature subtype Fixes #17062 (although more could probably be done to search for typos using REPL.string_distance and getting the method from stacktrace) Fixes #18877 Fixes #25263 Fixes #35126 Fixes #39280 Fixes #41728 Fixes #48731 Fixes #49917 Fixes #50369
Repeat of Discourse Post:
From Post:
The text was updated successfully, but these errors were encountered: