-
Notifications
You must be signed in to change notification settings - Fork 386
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
Allow users to ignore config files in the package. #936
Conversation
7d7933e
to
41f9ba9
Compare
bb1f3d7
to
87d650b
Compare
I've moved the configuration to |
87d650b
to
a6a5e9f
Compare
paths: &DockerPaths, | ||
ignore_cargo_config: bool, | ||
) -> Result<()> { | ||
let check_mount = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This checks if the path exists on the host (canonicalized), and only if it does, mounts it. This avoids any permission issues or creating undesired directories.
let mount_root = Path::new(paths.mount_root()); | ||
let mount_cwd = Path::new(paths.mount_cwd()); | ||
check_mount(docker, &paths.cwd, mount_cwd, Path::new(""))?; | ||
// CWD isn't guaranteed to be a subdirectory of the mount root. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we've removed /project
, this changes the logic here, so we don't necessarily have a relpath to the workspace root.
a6a5e9f
to
7e93d02
Compare
Adds the `CROSS_BUILD_ENV_IGNORE_CARGO_CONFIG` environment variable, which if set will mount an anoymous data volume for each `.cargo` subdirectory for the current directory and any parent directories up to the workspace root. If the build is called outside the workspace root or at the workspace root, only mount at the `$PWD/.cargo`.
7e93d02
to
c1af3bd
Compare
I'm likely going to merge this into a PR with #931, since the two are complimentary and I also need that to support allowing full passing of Cargo configuration files to cross. So, we can therefore have the default behavior ( |
Superseded by #931, which now includes this functionality. |
Adds the
CROSS_IGNORE_CARGO_CONFIG
environment variable, which if set will mount an anoymous data volume for each.cargo
subdirectory for the current directory and any parent directories up to the workspace root. If the build is called outside the workspace root or at the workspace root, only mount at the$PWD/.cargo
.Partially addresses #621.