Skip to content
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

Reject path-based dependencies in cargo package #3060

Merged
merged 3 commits into from
Sep 1, 2016

Conversation

rillian
Copy link
Contributor

@rillian rillian commented Aug 31, 2016

cargo publish will complain if a package manifest contains a path, rather than registry+version-based dependency. Make cargo package do the same so that issue is caught sooner in developer workflow.

Port registry::verify_dependencies to the `cargo package`
command to perform the local portion of that check. It
looks like the package operation doesn't generally make
reference to the registry, so skip variant-origin checks
until publish time.
Port of the equivalent test from the `cargo publish` command.
@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@rillian
Copy link
Contributor Author

rillian commented Aug 31, 2016

$ make test
sh tests/check-style.sh
checking for lines over 100 characters...
tests/package.rs:[WARNING] manifest has no documentation, homepage or repository. See http://doc.crates.io/manifest.html#package-metadata for more info.
make: *** [style] Error 1

This is just the test trying to match the actual command output. I guess I can fix the message in ops::cargo_package::verify_metadata.

@rillian rillian force-pushed the package_path_deps branch 2 times, most recently from efde3b1 to c5e5392 Compare September 1, 2016 03:47
This lets test result expected output pass the long-line style check.
@rillian
Copy link
Contributor Author

rillian commented Sep 1, 2016

Sorry for the noise. The tests don't all pass in my local environments, so it can be hard to tell what needs to be fixed.

@alexcrichton
Copy link
Member

@bors: r+ 3227546

Looks good to me, thanks!

@bors
Copy link
Collaborator

bors commented Sep 1, 2016

⌛ Testing commit 3227546 with merge b78beb1...

bors added a commit that referenced this pull request Sep 1, 2016
Reject path-based dependencies in `cargo package`

`cargo publish` will complain if a package manifest contains a path, rather than registry+version-based dependency. Make `cargo package` do the same so that issue is caught sooner in developer workflow.
@bors
Copy link
Collaborator

bors commented Sep 1, 2016

☀️ Test successful - cargo-cross-linux, cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-gnu-32, cargo-win-gnu-64, cargo-win-msvc-32, cargo-win-msvc-64
Approved by: alexcrichton
Pushing b78beb1 to master...

@bors bors merged commit 3227546 into rust-lang:master Sep 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants