Skip to content

Error when packaging with git dependencies without version #9612

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

Merged
merged 1 commit into from
Jun 23, 2021
Merged

Error when packaging with git dependencies without version #9612

merged 1 commit into from
Jun 23, 2021

Conversation

Bryysen
Copy link
Contributor

@Bryysen Bryysen commented Jun 23, 2021

If cargo package is run on a package that specifies a git dependency
without a version, cargo will error. This should help with clarifying
that git dependencies will be stripped when packaging, and that the
dependency has to be fetched from a registry.
Closes #9442

If `cargo package` is run on a package that specifies a git dependency
without a version, cargo will error. This should help with clarifying
that git dependencies will be stripped when packaging, and that the
dependency has to be fetched from a registry.
@rust-highfive
Copy link

r? @Eh2406

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 23, 2021
@Bryysen
Copy link
Contributor Author

Bryysen commented Jun 23, 2021

Essentially what I've done is perform the same checks that are performed when publishing, when packaging (as seen here). This wont fix all of the potential confusion arising from the dependency stripping when publishing/packaging, but hopefully it catches a few more.

@alexcrichton
Copy link
Member

@bors: r+

Looks reasonable to me, thanks!

@bors
Copy link
Contributor

bors commented Jun 23, 2021

📌 Commit 4e1910d has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 23, 2021
@bors
Copy link
Contributor

bors commented Jun 23, 2021

⌛ Testing commit 4e1910d with merge 4c27c96...

@bors
Copy link
Contributor

bors commented Jun 23, 2021

☀️ Test successful - checks-actions
Approved by: alexcrichton
Pushing 4c27c96 to master...

@bors bors merged commit 4c27c96 into rust-lang:master Jun 23, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 1, 2021
Update cargo

9 commits in 9233aa06c801801cff75df65df718d70905a235e..4952979031e2cf1d901c817a32e25a156a19db4c
2021-06-22 21:32:55 +0000 to 2021-07-01 01:14:50 +0000
- Fix `BorrowMutError` when calling `cargo doc --open` (rust-lang/cargo#9531)
- Exclude `target` from content-indexing on Windows (rust-lang/cargo#9635)
- Temporarily ignore 2021 edition fix. (rust-lang/cargo#9642)
- Temporarily disable future_incompat tests. (rust-lang/cargo#9638)
- Include toolchain specification in error message (rust-lang/cargo#9625)
- Error when packaging with git dependencies without version (rust-lang/cargo#9612)
- simply 'if' block (rust-lang/cargo#9615)
- tidy some closures and iterators (rust-lang/cargo#9614)
- use 'writeln' instead of appending newline character (rust-lang/cargo#9620)
@ehuss ehuss added this to the 1.55.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't create a package for a library
6 participants