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 test for when all members in a workspace are publish = false #859

Merged

Conversation

suaviloquence
Copy link
Contributor

Depends on #847; compare branches here.

I don't know if this is the behavior that we want (exiting silently with exit code 0, not semver-checking publish = false targets), but it is the current behavior, so this PR adds a test to snapshot this behavior.

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.

Awesome!

A neat variant we could try in a subsequent PR is this: "if the workspace contains a publish=false crate, but the -p option is used to specify it for checking explicitly, check it anyway despite publish=false"

@obi1kenobi obi1kenobi merged commit c53ff88 into obi1kenobi:main Aug 16, 2024
33 checks passed
@suaviloquence
Copy link
Contributor Author

A neat variant we could try in a subsequent PR is this: "if the workspace contains a publish=false crate, but the -p option is used to specify it for checking explicitly, check it anyway despite publish=false"

I started to write this. I found two different behaviors

  • when called with --workspace --package pkg, the --workspace flag takes precedence and the package is not semver-checked
  • when called with just --package pkg (but at the workspace root), the package is semver-checked.

Which (or both) of these were you thinking of adding?

@obi1kenobi
Copy link
Owner

Oooh those are both good! It feels like we might also want to check the package in both cases, what do you think?

As an aside, this is exactly the sort of edge case I was hoping this kind of testing capability would uncover, fix, and forever prevent regressions in.

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