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

Add tests for publish = false workspace members explicitly included with --package #866

Merged

Conversation

suaviloquence
Copy link
Contributor

Tests the two behaviors described in #859 (comment).

They are currently not consistent (--workspace --package xxx doesn't semver-check and --package xxx does).

@suaviloquence suaviloquence force-pushed the test-workspace-explicitly-publish branch from e8838e6 to 14397e9 Compare August 16, 2024 04:28
@suaviloquence
Copy link
Contributor Author

Now based on #867, compare link

@suaviloquence suaviloquence force-pushed the test-workspace-explicitly-publish branch from 14397e9 to a0c0a37 Compare August 16, 2024 04:32
Copy link
Owner

@obi1kenobi obi1kenobi left a comment

Choose a reason for hiding this comment

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

Looks good, happy to merge after #867.

Comment on lines +249 to +270
/// Running `cargo semver-checks` on a workspace with a `package = false` member,
/// explicitly including that member with `--package` and also specifying `--workspace`.
/// Currently, `--workspace` overrides `--package` and the `publish = false` member is not
/// semver-checked, and `cargo-semver-checks` silently exits 0.
Copy link
Owner

Choose a reason for hiding this comment

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

Would you mind opening an issue to make this consistent with just specifying `--package, and linking to it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See #868.

Comment on lines +260 to +279
"--manifest-path",
"test_crates/manifest_tests/workspace_all_publish_false/new",
Copy link
Owner

Choose a reason for hiding this comment

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

Another interesting question: what happens if we have --manifest-path test_crates/manifest_tests/workspace_all_publish_false/new/a/Cargo.toml?

Then we explicitly point to the package's manifest, ask for the workspace, then ask for the package itself.

Happy to accept this in a separate PR.

@suaviloquence suaviloquence force-pushed the test-workspace-explicitly-publish branch from a0c0a37 to 0f9bcc1 Compare August 16, 2024 17:19
@obi1kenobi obi1kenobi enabled auto-merge (squash) August 16, 2024 17:39
@obi1kenobi
Copy link
Owner

Just added a couple of our PR review notes as source code comments, to make our thinking on the subject easier to find in future iterations.

@obi1kenobi obi1kenobi merged commit 62a3c75 into obi1kenobi:main Aug 16, 2024
31 checks passed
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