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

Various bug fixes for cross. #904

Merged
merged 1 commit into from
Jul 3, 2022
Merged

Various bug fixes for cross. #904

merged 1 commit into from
Jul 3, 2022

Conversation

Alexhuszagh
Copy link
Contributor

Fixed cargo metadata failing with unstable arguments in rustflags if the default toolchain was not nightly. We also log any warnings that occurred if we cannot get metadata. Also fixed a lack of formatting in messages with remote docker support. The mount paths are also correctly processed if using docker-in-docker for mounted volumes.

Closes #901.
Closes #903.
Required for #873.

@Alexhuszagh
Copy link
Contributor Author

I've confirmed this works on:

  1. x86_64-pc-windows-msvc (Windows host, not WSL2)
  2. x86_64-unknown-linux-gnu (Linux host, host not in Docker)
  3. x86_64-unknown-linux-gnu (Linux host, Docker in Docker)
  4. x86_64-unknown-linux-gnu (Windows host, WSL2)

@Alexhuszagh Alexhuszagh added this to the v0.2.3 milestone Jul 3, 2022
src/docker/remote.rs Outdated Show resolved Hide resolved
src/docker/remote.rs Outdated Show resolved Hide resolved
src/docker/shared.rs Show resolved Hide resolved
Fixed `cargo metadata` failing with unstable arguments in rustflags if the default toolchain was not nightly. We also log any warnings that occurred if we cannot get metadata. Also fixed a lack of formatting in messages with remote docker support. The mount paths are also correctly processed if using docker-in-docker for mounted volumes.
Copy link
Member

@Emilgardis Emilgardis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 3, 2022

Build succeeded:

@bors bors bot merged commit 74c3ba6 into cross-rs:main Jul 3, 2022
@Alexhuszagh Alexhuszagh deleted the bugfix branch July 3, 2022 14:20
bors bot added a commit that referenced this pull request Jul 16, 2022
942: Use non-canonical paths for mount paths. r=Emilgardis a=Alexhuszagh

Symlinks and canonical paths can destroy assumptions about paths: say I have a file at `/tmp/path/to/file` I reference in my crate, and ask to mount `/tmp/path/to` on the container. Currently, on macOS, since `/tmp` is a symlink to `/private/tmp`, the code that expects `/tmp/path/to/file` will fail because in the container it will be mounted at `/private/tmp/path/to/file`.

In addition, this fixes `DeviceNS` parsing with drive letters (this previously didn't matter since it never occurred, due to `dunce` canonicalization). This PR also fixes a minor bug where the host root instead of the var names was passed as the environment variable (introduced in #904).

Closes #920.

Co-authored-by: Alex Huszagh <ahuszagh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some RUSTFLAGS Force Cargo Use on the Host Docker-in-Docker fails with Mounted Volumes in Workspaces
2 participants