Skip to content

Reflect the addition of the -p flag in Cargo 1.56 in chapter 14#3051

Merged
carols10cents merged 1 commit intorust-lang:mainfrom
foresterre:ch14-package-opt
Apr 29, 2022
Merged

Reflect the addition of the -p flag in Cargo 1.56 in chapter 14#3051
carols10cents merged 1 commit intorust-lang:mainfrom
foresterre:ch14-package-opt

Conversation

@foresterre
Copy link
Copy Markdown
Contributor

@foresterre foresterre commented Feb 7, 2022

In Cargo 1.56 (2021-10-21) [1][2], support for publishing a package from a Cargo workspace was added to the cargo publish command.

The book however still mentioned that it wasn't possible to publish a package unless you were navigated into the respective package and published from there.

This commit fixes the text which mentioned it isn't possible, and the text
was instead changed to be an example of how the flag can be used (similar to
the cargo test -p [spec] above it).

The manual-regeneration comment was taken from Chapter 14.2 (Publishing a Crate
to Crates.io) as the example was similar to the publish a crate example there.

[1] rust-lang/cargo#9559
[2] https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#added-4

In Cargo 1.56 (2021-10-21), support for publishing a package from a Cargo workspace
was added to the `cargo publish` command.

The book however still mentioned that it wasn't possible to publish a package
unless you navigated into the respective package directory and published from
there.

This commit fixes the text which mentioned it isn't possible, and the text
was instead changed to be an example of how the flag can be used (similar to
the `cargo test -p [spec]` above it).

The manual-regeneration comment was taken from Chapter 14.2 (Publishing a Crate
to Crates.io) as the example was similar to the publish a crate example there.
@carols10cents carols10cents added this to the ch14 milestone Feb 10, 2022
Copy link
Copy Markdown
Member

@carols10cents carols10cents left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@carols10cents carols10cents merged commit 01b4aa4 into rust-lang:main Apr 29, 2022
@foresterre foresterre deleted the ch14-package-opt branch April 29, 2022 14:18
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.

2 participants