I’m trying to implement a deprecation warning in the parser. I think I’ve found the function to do it with, parser-depwarn
. But it doesn’t appear to emit anything to the REPL. If I replace it with an error
call, the error triggers and shows in the REPL, so the code path must be used.
Is there a different function I should be using? Or are warnings turned off in a default build?
@jeff.bezanson is the expert on this. We haven’t had any syntax depreciations in a while but you can look at the 0.7 code to see what the correct usage was.
3 Likes
Oh duh, it was right in front of me in jlfrontend.scm. Just needed to tune my eyeballs.
And ahhh, looks like it was turned off by default 5 months ago, to make packages with deprecation warnings run without warnings: https://github.com/JuliaLang/julia/pull/35362
That seems potentially problematic?
The suggestion was that devs just had to run with --depwarn=yes, but I couldn’t find that at all by searching the documentation.
Is it possible to toggle them on/off within the REPL? And why can’t the end user just turn them off if it is a problem for their specific use, rather than create a silent failure mode for developers?
Or perhaps when depwarn=no
, Julia could just track that there was at least one deprecation warning, emit that fact to let the user know they can turn on depwarn
s to see the details, but be silent about the rest during that process’s lifetime?
1 Like