-
Notifications
You must be signed in to change notification settings - Fork 4
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
CRAN check encounters compilation warnings (r-release-macos) #9
Comments
Hi @davidchall thanks for posting this. Now I don't quite recall what I saw but I think i saw some package somewhere having an issue. Maybe it was yours (scratches chin...). The best best is probably to look upstream if there is a fix 'for free' in a new release. I apparently last upgrade in June of 2022 to 1.22.1 (and I recall upstream was somewhat quiet leading up to it). But I now see 1.28.0 at https://think-async.com/Asio/ so that will likely fix it. I will try to address this 'pronto' but I have a few other changes on my plate due to the format string checks added by r-devel. If you happen to have spare cycles help with a PR would be great. As I recall it is mostly a matter of copying / rsyncing the files in and then running a rev.dep check. |
Hi @eddelbuettel - Unfortunately, I still see It appears some users have encountered this compiler warning since Jan 2021: chriskohlhoff/asio#785 Update: Asio author says the compilation warning is wrong: chriskohlhoff/asio#290 (comment) |
Ouch. Now we need a little bit of creative thinking .... |
Hi @eddelbuettel - I think I have a better understanding of what's gone wrong now.
Here are the latest recommendations:
But I'm still not sure what's the best approach for CRAN. My understanding is that they typically don't want us to suppress compiler warnings. |
They don't but they only control for what they can control for -- usually they check (via
I need to comment out for So I think we're good. Can you try the #define locally? |
Hi @eddelbuettel - In davidchall/ipaddress#95, I've successfully reproduced the macOS compiler warning (build). Then in the following commit I've silenced the warning by adding the macro to the Makevars file (build). I think this is what you asked me to confirm. Are the next steps for you to incorporate this macro into AsioHeaders? |
Spot on. I suspect we can do that centrally via a PR (but then need to remember to patch each time going forward). Or is recommending to add to Thoughts? |
My preference is to add this to AsioHeaders for a couple of reasons:
Regarding repeated patches, I suspect (perhaps naively) this will be a one-time patch, because:
|
Are we talking about the same thing? Or am I missing something? Apologies if I do as I have my head in multiple concurrent conversations ... |
So one way around it (via the beloved Fundamental Theorem of Software Engineering) would be to add a new header which includes the |
Sorry if I made this confusing. Here's my expectation of how this could work:
This wouldn't work for ipaddress because it includes specific headers (not a default header). See code search results. |
Can you not separate out the I would love to be responsible for fewer recurring steps if I can. Maybe I do codesearch later to see how other users of the package pull it in. |
There are two reverse dependencies (both I think adding a simple |
Yeah, I initially thought that was like using a sledgehammer to hit a nail, but it's much simpler than the other options. I'll go with that. |
It's also more robust. You won't have to depend on me not forgetting to patch and all that. And remind me again: we only need this on macOS until the compiler updates? |
I believe so. I've not seen the warning from the default macOS image on GitHub Actions or my local machine, and these both use more recent toolchains. I had to manually override the macOS SDK path to force this warning to appear. |
Can you think of a clever conditional way to inject the |
Unfortunately, I couldn't find a way to do it. So I plan to use the sledgehammer and keep an eye on when CRAN updates above "MacOSX11.3.sdk". |
Yeppers so I think we are circling around 'unconditionally add the |
Would appear you have a new version at CRAN so closing this. |
The ipaddress package encounters CRAN check warnings on r-release-macos, caused by compilation warnings from AsioHeaders:
I suspect these warnings started appearing because CRAN have updated their compiler toolchain on r-release-macos, but I don't have further details. Do you have advice on how to resolve these, or will this require a new release of AsioHeaders?
The text was updated successfully, but these errors were encountered: