Skip to content

Git dependencies build outcommented workspace members #4636

Closed
@msiglreith

Description

@msiglreith

We (gfx-rs) recently renamed a crate (gfx-core -> gfx_hal) but didn't update all dependencies for crates which aren't members in our root level workspace definition. (e.g #"src/backend/dx11",)

Trying to specify a git dependency:

[package]
name = "gfx_hal_test"
version = "0.1.0"
authors = [""]

[dependencies]
gfx-hal = { git = "https://github.com/gfx-rs/gfx.git" } 

results in

    Updating git repository `https://github.com/gfx-rs/gfx.git`
error: failed to load source for a dependency on `gfx-hal`

Caused by:
  Unable to update https://github.com/gfx-rs/gfx.git

Caused by:
  Could not find `Cargo.toml` in `E:\Rust\git\checkouts\gfx-e86e7f3ebdbc4218\be24f6f\src\core`

It tries to search for a Cargo.toml of our old/removed gfx_core crate. (e.g dependency of "src/backend/dx11")

I expected to see this happen: cargo ignoring outcommented crates of the workspace

Our 'fix': We remove all references/outdated crates from the repository which should fix this again.

I'm using cargo 0.22.0 (3423351a5 2017-10-06)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-gitArea: anything dealing with gitC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions