extendr / rextendr

An R package that helps scaffolding extendr-enabled packages or compiling Rust code dynamically
https://extendr.github.io/rextendr/
Other
197 stars 27 forks source link

Add `--print=native-static-libs` when compiling #393

Closed JosiahParry closed 4 weeks ago

JosiahParry commented 4 weeks ago

Per suggestion of Yutanni, we should add --print=native-static-libs which gives us insight into which linker flags need to be visible when building our crate.

If a user encounters an error building, they can check the output.

JosiahParry commented 4 weeks ago

Note that the snapshot tests are failing because between the version of {usethis} that I have 2.2.3 and the version being tested on main 3.0.0. there is a period placed at the end of the use_build_ignore() message:

-   v Adding "^src/rust/vendor$" to '.Rbuildignore'.
+   v Adding '^src/rust/vendor$' to '.Rbuildignore'
-   v Adding "src/rust/vendor" to '.gitignore'.
+   v Adding 'src/rust/vendor' to '.gitignore'

This has taken a while to debug. Perhaps we can reduce what the snapshot tests are actually testing.

JosiahParry commented 4 weeks ago

This PR also fixes the R-devel errors. It does this by adding the configure and tools/msrv.R scripts from use_cran_defaults() into the standard use_extendr().

CGMossa commented 4 weeks ago

We need to make this flag additive to if it was set by the user to contain more options though.

And now that apparently all package tests are cran tests... I don't know what we do about that.