-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle cargo workspaces in git repositories
Crates downloaded from crates.io can just be put into the vendored-sources directory. However a referenced git repository might contain multiple crates in a so-called "workspace". If we put such a workspace into the vendor folder, cargo fails with > found a virtual manifest at [...]Cargo.toml instead of a package manifest This solution uses a separate folder for sources downloaded from git repositories and checks them for workspaces. If they are "regular", i.e. don't have a workspace, they are put to the vendored sources from crates.io. Otherwise they are left in the git-vendor directory. Additionally refine the config.toml entry for sources vendored from git. This allows to override a specific git URL and revision with the path to the extracted repository. Otherwise we would need entries for each crate in workspaces but then cargo tries to verify the revision and fails with > Unable to update https://github.com/[...]?rev=[...] > Caused by: can't checkout from 'https://github.com/[...]': you are in the offline mode (--offline)
- Loading branch information
Showing
1 changed file
with
158 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters