Skip to content

Workspace binary artifacts are added to target/debug/deps on Windows which breaks build script #69318

Closed

Description

@lopopolo

I am building a workspace. One crate in the workspace produces a ruby binary. Another crate has a build script that does a std::process::Command subprocess with the ruby binary (expected to be system Ruby). target/debug/deps is prepended to the PATH for build scripts on Windows.

I expected to see this happen: On mac and linux, binaries produced by the workspace end up only in target/debug. target/debug/deps only contains rlib, meta, and debug symbols for dependent crates. I expect the subshell invoked in the build script to not see workspace artifacts on Windows as is the case on mac and linux.

Instead, this happened: On Windows, the workspace built binaries end up in target/debug/deps in addition to target/debug. This resolves the workspace ruby first, which breaks the build script. This means that building more than once fails.

Meta

rustc --version --verbose:

rustc 1.41.0 (5e1a79984 2020-01-27)
binary: rustc
commit-hash: 5e1a799842ba6ed4a57e91f7ab9435947482f7d8
commit-date: 2020-01-27
host: x86_64-pc-windows-msvc
release: 1.41.0
LLVM version: 9.0
Backtrace

<backtrace>

Activity

  1. retep998 commented on Feb 21, 2020

    @retep998
    Contributor

    I believe this issue may be better suited for the cargo repository.

  2. lopopolo commented on Feb 22, 2020

    @lopopolo
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions