Skip to content
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

usethis::use_rcpp_armadillo() Generates CXX_STD=CXX1, Leading to CRAN Note on C++11 Specification #1889

Open
TimothyMerlin opened this issue Aug 23, 2023 · 1 comment
Labels
bug an unexpected problem or unintended behavior code 🖥️ R/, tests/ good first issue ❤️ good issue for first-time contributors tidy-dev-day 🤓 Tidyverse Developer Day

Comments

@TimothyMerlin
Copy link

Issue: usethis::use_rcpp_armadillo() Generates CXX_STD=CXX1, Leading to CRAN Note on C++11 Specification

Description:

When using the usethis::use_rcpp_armadillo() function, it generates src/Makevars and src/Makevars.win with CXX_STD=CXX1 . Running devtools::check() subsequently raises a note:

checking C++ specification ... NOTE 

Specified C++11: please drop specification unless essential

This issue creates a non-compliance with CRAN standards, requiring that the line, containing CXX_STD=CXX1, is manually removed in both files.

Steps to Reproduce:

  1. Call the usethis::use_rcpp_armadillo(name = "cppcode") function.
  2. Run devtools::check().
  3. Observe the note regarding the C++11 specification.

Expected Behavior:

The function should generate src/Makevars and src/Makevars.win without CXX_STD=CXX1 or handle this in a way that aligns with CRAN's requirements.

Actual Behavior:

The line CXX_STD=CXX1 is generated, leading to a note during the check process, and manual removal is required to conform to CRAN.

Suggested Fix:

Either omit this line or handle it in a way that is compatible with CRAN standards.

System Information:

  • usethis version: 2.2.2
  • devtools version 2.4.5
  • R version: 4.3.1
  • Operating System: Ubuntu 22.04.2 LTS
@hadley hadley added bug an unexpected problem or unintended behavior good first issue ❤️ good issue for first-time contributors code 🖥️ R/, tests/ labels Nov 3, 2023
@jennybc
Copy link
Member

jennybc commented Nov 3, 2023

For reference, here's where the equivalent already happened for use_cpp11(): 4a83ded

@jennybc jennybc added the tidy-dev-day 🤓 Tidyverse Developer Day label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior code 🖥️ R/, tests/ good first issue ❤️ good issue for first-time contributors tidy-dev-day 🤓 Tidyverse Developer Day
Projects
None yet
Development

No branches or pull requests

3 participants