cpp11 icon indicating copy to clipboard operation
cpp11 copied to clipboard

vendor path

Open pachadotdev opened this issue 1 year ago • 6 comments
trafficstars

A tidy (as in less noise and just 1 commit) version of #340

As @krlmlr suggested, it might be better to vendor to src/vendor instead of inst

This PR implements that and also a better handling and messages about Makevars

pachadotdev avatar Feb 16 '24 04:02 pachadotdev

I don't currently have the resources to spend much time on cpp11, but I don't love vendoring in general because it doesn't actually 100% insulate you from cpp11 changes. Previous versions of cpp11 relied on a global R option for the precious list, and that ends up getting shared between, say:

  • Pkg A using vendored cpp11 0.4.5
  • Pkg B using CRAN cpp11 0.4.7

So they aren't fully independent, and if there are changes made to the structure of the thing that gets stored in the global option (which has happened) then whoever sets up the global option first "wins" and can cause the other package to break

DavisVaughan avatar Apr 02 '24 13:04 DavisVaughan

Interesting. Do you think problems like this are going to resurface?

I've seen very weird behaviors when two cpp11 packages (one of them being duckdb) were used in the same R session. Could have been that.

For duckdb, I don't see a good alternative to vendoring. But if this isn't going to be widely supported, I'm fine with hacking my own solution to move from inst/cpp11 .

krlmlr avatar Apr 02 '24 14:04 krlmlr

@krlmlr hi, I re-made the part that edits the DESCRIPTION

pachadotdev avatar Apr 09 '24 13:04 pachadotdev

@krlmlr hi, I re-made the part that edits the DESCRIPTION

pachadotdev avatar Apr 09 '24 13:04 pachadotdev

hi @DavisVaughan @krlmlr I made a small change because I sent another package to CRAN (cpp11armadillo), which was rejected for using path = ".". That issue may eventually affect cpp11. I have used dir and subdir now :)

pachadotdev avatar May 13 '24 15:05 pachadotdev

btw, the only CI that fails is gcc 4.8 because of a bug with the compiler itself

pachadotdev avatar May 13 '24 15:05 pachadotdev