Skip to content

Git dependencies build outcommented workspace members #4636

@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)

Activity

added
A-gitArea: anything dealing with git
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
on Oct 18, 2017
ehuss

ehuss commented on Mar 23, 2020

@ehuss
Contributor

This should be more-or-less fixed by #7947, where broken path dependencies are ignored.

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

    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

        Participants

        @ehuss@alexcrichton@msiglreith

        Issue actions

          Git dependencies build outcommented workspace members · Issue #4636 · rust-lang/cargo