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

fix(template): set CARGO_BUILD_JOBS=2 on CRAN #312

Closed
wants to merge 1 commit into from

Conversation

eitsupi
Copy link
Contributor

@eitsupi eitsupi commented Aug 15, 2023

The CRAN policy limits the number of cores that can be used during installation to 2.

From https://cran.r-project.org/web/packages/policies.html

Checking the package should take as little CPU time as possible, as the CRAN check farm is a very limited resource and there are thousands of packages. Long-running tests and vignette code can be made optional for checking, but do ensure that the checks that are left do exercise all the features of the package.

If running a package uses multiple threads/cores it must never use more than two simultaneously: the check farm is a shared resource and will typically be running many checks simultaneously.

From https://cran.r-project.org/web/packages/using_rust.html

cargo build -j N defaults to the number of ‘logical CPUs’. This usually exceeds the maximum allowed in the CRAN policy, so needs to be set explicitly to N=1 or 2.

@eitsupi
Copy link
Contributor Author

eitsupi commented Aug 15, 2023

Note that hellorust switched from configuration by CARGO_BUILD_JOBS=2 to using the -j 2 option between 1.1.0 and 1.1.1.
r-rust/hellorust@a3ae6c2

The reason is unknown.

I am not sure if using CARGO_BUILD_JOBS=2 here is a bad idea, as either setting should have the same effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant