forked from wch/r-source
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Allow suppression of warnings and messages with missing restarts #20
Open
lionel-
wants to merge
579
commits into
trunk
Choose a base branch
from
fix-missing-restarts
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git-svn-id: https://svn.r-project.org/R/trunk@76708 00db46b3-68df-0310-9c12-caf00c1e9a41
a subsequent '[' literally (and not giving an optional item label). git-svn-id: https://svn.r-project.org/R/trunk@76709 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76710 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76711 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76715 00db46b3-68df-0310-9c12-caf00c1e9a41
…TRUE (related to PR#17478). git-svn-id: https://svn.r-project.org/R/trunk@76718 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76721 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76724 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76725 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76726 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76728 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76729 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76730 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76732 00db46b3-68df-0310-9c12-caf00c1e9a41
most printing. git-svn-id: https://svn.r-project.org/R/trunk@76734 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76737 00db46b3-68df-0310-9c12-caf00c1e9a41
interference with code that locks GC. git-svn-id: https://svn.r-project.org/R/trunk@76738 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76739 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76740 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76741 00db46b3-68df-0310-9c12-caf00c1e9a41
…, PR#17573) git-svn-id: https://svn.r-project.org/R/trunk@76742 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76743 00db46b3-68df-0310-9c12-caf00c1e9a41
… should be true; new argument `na.action = ".."` determines *how* NA/NaN are treated git-svn-id: https://svn.r-project.org/R/trunk@76744 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76745 00db46b3-68df-0310-9c12-caf00c1e9a41
…eady includes options (such as --force-local). git-svn-id: https://svn.r-project.org/R/trunk@76746 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76747 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76749 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76750 00db46b3-68df-0310-9c12-caf00c1e9a41
gfortran >= 7 (on Windows, mirrors 76467). git-svn-id: https://svn.r-project.org/R/trunk@76751 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@76752 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77008 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77009 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77010 00db46b3-68df-0310-9c12-caf00c1e9a41
mention additional flags as used by Fedora/RHEL git-svn-id: https://svn.r-project.org/R/trunk@77011 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77012 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77013 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77016 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77017 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77018 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77019 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77020 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77021 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77022 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77023 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77024 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77026 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77027 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77028 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77029 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77030 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77031 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77032 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77034 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77035 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77037 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77038 00db46b3-68df-0310-9c12-caf00c1e9a41
git-svn-id: https://svn.r-project.org/R/trunk@77040 00db46b3-68df-0310-9c12-caf00c1e9a41
8936d68
to
0665f9f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The attached patch makes it possible to use
suppressMessages()
andsuppressWarnings()
with code that signals messages and warnings withnon-default protocols. For example, signalling a message with
warning()
or a warning withmessage()
are instances of non-defaultprotocols. In that case, the restarts that are part of the default
signalling protocols for those condition classes are missing. This
currently causes
suppressMessages()
andsuppressWarnings()
to failwith an error. The patch fixes this by first checking that the restart
exists before trying to invoke it.
Since that is needed in multiple places in base R and in packages, I
have extracted the pattern in a dedicated function
maybeInvokeRestart()
.Initially I made it an argument to
invokeRestart()
, but it didn'tfeel right the control flow semantics of a function via an argument.
Furthermore, it seems the permissive pattern should be used whenever
the condition is signalled from foreign contexts over which the
developer has no control. On the other hand, the strict variant should
be used when restarts are used for control flow effects within a
package. Given these strictly different usages, a new variant seems
more appropriate than an option.