GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||
GeezerVison is showing github.com — Lay the ground for Rf_error masking (#1402) by Enchufa2 · Pull Request #1407 · RcppCore/Rcpp Conversation
|
| File | Description |
|---|---|
| inst/include/Rcpp/macros/mask.h | New file introducing the Rf_error macro that shows a compilation message directing users to Rcpp::stop() |
| inst/include/RcppCommon.h | Includes the new mask.h header file at the end of the common includes |
| src/attributes.cpp | Protects auto-generated Rf_error call with parentheses to prevent macro expansion |
| inst/tinytest/cpp/stack.cpp | Protects test code's Rf_error call with parentheses and updates copyright |
| inst/tinytest/testRcppInterfaceExporter/src/RcppExports.cpp | Protects auto-generated Rf_error call with parentheses |
| ChangeLog | Documents all changes made in this PR |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Also better than my PR where @copilot always finds a typo to nag about.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
So, as discussed, and the revdep machine made it clear, we cannot generate a note. Pragma messages are considered statements by gcc (see e.g. here and bugs linked there). Options are: be silent, or generate a warning without replacing. In order to ask CRAN about what they think, we need to calculate how many packages would generate this warning. An upper bound was provided here by just grepping the sources of all reverse dependencies: 263 packages. From these, only 24 would also fail compilation or checks as documented in #1406. To further refine this list, we could collect the install logs and grep for the pragma (are they in the revdep machine from the previous run?). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
ce5cee3 to
461e8ad
Compare
461e8ad to
c4f682a
Compare
|
This is a version that emits a message instead of a warning, and avoids the problem of inserting two statements. Could we run a revdep with this? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
598c0a9 to
b1889a9
Compare
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me (modulo a micro-comment), let's see what the reverse dependencies say (in due time, now running).
(I asked copilot too which often catches little gotchas.)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
First package to break compilation is It's an interaction with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ah, of course, group 1 in #1406 is expected to fail due to the inclusion of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
326614b to
bb86312
Compare
There was an error while loading. Please reload this page.
|
Apologies for the back-and-forth, but the internal template thing didn't work. I thought that the message would be shown only if the template was instantiated, but that's not the case. I thought I tested it correctly, but obviously I did something wrong, because now I see messages all over the place when So we are back at square 1, meaning two options:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Let's take (1) and merge this then? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Yes. Let me catch my breath after all the excitement in #1430 and get back to you. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This looks good, but ... it now does nothing?
So shall we merge this as a placeholder to be activated once 'group 1' of R.h has been cleaned up?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Should we maybe not comment it out (as right now) but make it active behind an 'opt-in' environment variable? Then we could merge now, and we (and Kurt) can run with the variable set. Better? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* Add a message at compilation time * Protect the valid Rf_error calls generated by Rcpp
…switching to a warning
b0a804b to
ae9cd85
Compare
ae9cd85 to
f5857fb
Compare
There was an error while loading. Please reload this page.
|
Sounds good to me. Here it is with an on switch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Looks like a double env var :) That'll do. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes, it's a great idea. CRAN may inject that flag when they're ready to process such warnings. In June the warning may be unconditional (unless disabled explicitly), then next year this may be an error. Thanks, merging here! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
So for completeness I ran a reverse-dependency check over what is now in the main branch as 1.1.0.13, and a single package came up with an issue: a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.