-
-
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
RFC: add the ability to disable syntax deprecation warnings #9294
Conversation
9fe0c31
to
1ef4558
Compare
Great! |
@@ -241,3 +241,18 @@ end | |||
|
|||
warn(err::Exception; prefix="ERROR: ", kw...) = | |||
warn(sprint(io->showerror(io,err)), prefix=prefix; kw...) | |||
|
|||
# Julia compiler options struct |
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.
Can we add a comment that this mirrors the jl_compileropts_t
struct from julia.h
I need to change the names a bit to better reflect that this is only for syntax deprecations. |
Why not add a check in on the edit: updated placement suggestion. |
Ok I've expanded this to methods as well. I really just need a run time way to turn of syntax deprecation warnings in the frontend, but I could see how turning off method deprecations would be useful. |
698e720
to
1ca287f
Compare
I tried to do a small cleanup (no reason to collect the bt if we're not going to warn) if the |
1ca287f
to
3c900f5
Compare
👍 |
18b7749
to
d6b38d8
Compare
As I commented on the |
283bcc1
to
04856b7
Compare
Ok I've updated with @StefanKarpinski's UI suggestions. I guess the only question now is if it is useful to have this as a runtime or compile time check. A compile time check would remove the performance penalty of deprecated methods, syntax deprecations could still be toggled at runtime. |
04856b7
to
e0f985a
Compare
The `--depwarn={yes|no}` flag turns on/off method warnings and deprecated syntax warnings in the parser. (unexported) `compileropts()` method added to retrieve the compileropts struct from libjulia. (unexported) `syntax_deprecation_warnings(::Bool)` method added to turn off syntax deprecation warnings in the parser at runtime. the method returns the previous syntax deprecation warning state. add NEWS entry and update docs for command line switches
e0f985a
to
4d38dc3
Compare
This is a great performance improvement for deprecated methods anyway. |
I don't have a strong opinion. If there's still some performance hit it will act as encouragement to update the code, which might not be a bad thing. OTOH, I imagine the use case for most people will be "I have some old code that I just need to run to finish this {presentation|paper|grant}, once that's done I'll fix the code"; for them, the ability to toggle inside a session would be irrelevant. If you don't really care either, then you can take advantage of the new UI and wait for someone who really needs it to add a |
This is failing on appveyor and locally on Win64 due to #9366, it doesn't need to be restarted. |
RFC: add the ability to disable syntax deprecation warnings
Adds the ability to turn off syntax deprecations in the parser with a command line flag
--no-depwarn
or at runtime: