You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that #1824 is fixed, messages are no longer shown in red but warnings still are. This creates inconsistent styling and causes warnings to stand out more than errors:
I propose to add a condition handler for warnings too. Since we have a read_console() method with which we can detect the end of a top-level command, we have greater control than in a package like rlang. This allows us to reliably collect warnings emitted during top-level commands.
This would let us style the warning prefix differently and leave the message styled in normal text:
We could also emit the warnings to the frontend so they get their own special box like errors. By the same token, this would allow us to record elided warnings persistently in the output. Currently you can lose elided warnings when running multiple commands. In the following example the warning("bar") call overwrites the 50 warnings that were hidden from the user:
for (iin1:100) warning("foo")
#> There were 50 or more warnings (use warnings() to see the first 50)# Overwrites
warning("bar")
#> Warning message:#> bar# 100 warnings now lost
warnings()
#> Warning message:#> bar
Instead we could emit the warnings (or a summary if there are too many) to the frontend that would display them in a collapsable box. The warnings would no longer be sensitive to the state of the R REPL.
The text was updated successfully, but these errors were encountered:
Now that #1824 is fixed, messages are no longer shown in red but warnings still are. This creates inconsistent styling and causes warnings to stand out more than errors:
I propose to add a condition handler for warnings too. Since we have a
read_console()
method with which we can detect the end of a top-level command, we have greater control than in a package like rlang. This allows us to reliably collect warnings emitted during top-level commands.This would let us style the warning prefix differently and leave the message styled in normal text:
We could also emit the warnings to the frontend so they get their own special box like errors. By the same token, this would allow us to record elided warnings persistently in the output. Currently you can lose elided warnings when running multiple commands. In the following example the
warning("bar")
call overwrites the 50 warnings that were hidden from the user:Instead we could emit the warnings (or a summary if there are too many) to the frontend that would display them in a collapsable box. The warnings would no longer be sensitive to the state of the R REPL.
The text was updated successfully, but these errors were encountered: