But this does not play nicely with rust_source or rust_function, because it doesn't invoke a cargo update, therefore,
it sometimes result in using of cached dependencies, instead of defaulting to the latest one.
If one only used the publishedextendr-api on crates.io, then maybe that would be fine, but with use of say use_dev_extendr=, it becomes a source of false positives (in terms of errors).
Several people have custom
target-dir
in their~.cargo/config.toml
, or they overrideCARGO_TARGET_DIR
/CARGO_BUILD_TARGET_DIT
, see https://doc.rust-lang.org/cargo/reference/config.html#buildtarget-dirBut this does not play nicely with
rust_source
orrust_function
, because it doesn't invoke acargo update
, therefore, it sometimes result in using of cached dependencies, instead of defaulting to the latest one.If one only used the published
extendr-api
on crates.io, then maybe that would be fine, but with use of sayuse_dev_extendr=
, it becomes a source of false positives (in terms of errors).I believe we should either set / reset this environment variable when creating "homeless" rust snippets, and even or even use
--target-dir
in the cargo-invocation even, see https://doc.rust-lang.org/cargo/commands/cargo-build.html?highlight=target-dir#output-options for documentation.