r-lib / pkgbuild

Find tools needed to build R packages
https://pkgbuild.r-lib.org
Other
65 stars 33 forks source link

Add option to turn off has_compiler() checks #142

Closed krlmlr closed 1 year ago

krlmlr commented 1 year ago

These can be misleading, e.g., in the presence of antivirus programs on Windows.

gaborcsardi commented 1 year ago

Thanks! Makes sense. Requested a small change.

krlmlr commented 1 year ago

Thanks! I'm now using a pattern also found in rlang. Resetting an invalid option with a message seems good enough for the use case?

gaborcsardi commented 1 year ago

IDK, I don't love this. I think if somebody sets this option to the wrong value, then it should not be ignored. It is probably a mistake that they would want to fix. So erroring seems better for me. As a general rule, I also don't think that package code should permanently modify options.

Anyway, I updated this, will wait for the CI, and then merge it. Thanks again!