Issue
When defining environment variables in a build script within a workspace, they are not correctly handle by the cache. This is visible in non incremental build (in release with default config).
Setup:
- Have a build script defining an environment variable from an outside input (a file, with rerun on it) and use it in a crate
- Use that crate in a binary crate
- Build and run in release
- Edit the outside input
- Build and run in release (the build script is triggered due to the rerun)
- => The execution should use the new value but did not: cache issue, environment variable changes not seen
Minimal reproducer
# extract archive, cd into extracted folder
> RUSTC_WRAPPER=cachepot cargo r --release
# should output: "Value is: something else"
# Edit the parameter read by the build script
> echo "anything else" > parameter.txt
> RUSTC_WRAPPER=cachepot cargo r --release
# should output: "Value is: anything else" but output the same as last time
cachepot-env-vars.tar.gz