-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Closed
Copy link
Description
Based on the discussion here: #35362 and having run into this silent failure mode, I suggest a compromise:
- Restore default to
depwarn=yes - Add
depwarn=verbose - Under
yes, Julia tracks deprecations received but does not print them. On receipt, it just prints a single warning shown below, with details accessible by a function call. - Under
verbose, all warnings are printed as they are received, which is the current behavior foryes - Under
no, no deprecations are tracked.
The single warning under yes would be something like:
┌ Warning: The running code contains deprecations at REPL[1]:1.
│ Use `depwarns()` to print the list of warnings, or start Julia with --depwarns=verbose to show warnings when they happen.
│ Deprecated code will still execute correctly. This warning will not be displayed again during this session.
└ @ REPL[1]:1
This could even just be a boolean switch that gets flipped on for the first deprecation received and nothing else, just to inform the user that they can take an action to see the warnings. More usefully, it could store the deprecation messages received in a set and display the specific ones received when a function is called, as in the example message above.
I can understand that it might still bother users of big packages to see a warning at all, but I think the tradeoff would be fair?
Metadata
Metadata
Assignees
Labels
No labels