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

Consider CARGO_TARGET_DIR #353

Open
CGMossa opened this issue May 13, 2024 · 0 comments
Open

Consider CARGO_TARGET_DIR #353

CGMossa opened this issue May 13, 2024 · 0 comments

Comments

@CGMossa
Copy link
Member

CGMossa commented May 13, 2024

Several people have custom target-dir in their ~.cargo/config.toml, or they override
CARGO_TARGET_DIR / CARGO_BUILD_TARGET_DIT, see https://doc.rust-lang.org/cargo/reference/config.html#buildtarget-dir

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 published extendr-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).

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.

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

No branches or pull requests

1 participant