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

fix: only inherit workspace package table if the new package is a member #13261

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: correct not_inherit_workspace_package_table_if_not_members case
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
  • Loading branch information
Rustin170506 committed Jan 8, 2024
commit 87345a19327659f3e2e0899076e6c201eaf5ff9f
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[workspace]
exclude = ["bar"]
[workspace.package]
authors = ["Rustaceans"]
description = "foo"
Expand All @@ -13,3 +15,8 @@ include = ["foo"]
license = "MIT OR Apache-2.0"
publish = false
repository = "foo"

[package]
name = "foo"
version = "0.1.0"
edition = "2018"
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fn case() {

snapbox::cmd::Command::cargo_ui()
.arg("new")
.args(["foo"])
.args(["bar"])
.current_dir(cwd)
.assert()
.success()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = ["foo"]
exclude = ["bar"]
[workspace.package]
authors = ["Rustaceans"]
description = "foo"
Expand All @@ -15,3 +15,8 @@ include = ["foo"]
license = "MIT OR Apache-2.0"
publish = false
repository = "foo"

[package]
name = "foo"
version = "0.1.0"
edition = "2018"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "foo"
name = "bar"
version = "0.1.0"
authors.workspace = true
description.workspace = true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
Created binary (application) `foo` package
warning: compiling this new package may not work due to invalid workspace configuration

failed to parse manifest at `[ROOT]/case/bar/Cargo.toml`

Caused by:
error inheriting `edition` from workspace root manifest's `workspace.package.edition`

Caused by:
failed to find a workspace root
Created binary (application) `bar` package