Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
library: return required update for each crate #398
library: return required update for each crate #398
Changes from 36 commits
410152f
40e6ec2
910ad05
55ab5fc
9e84da2
15ff574
8ac3889
41540c5
1445fb6
6f1bcee
31e8845
a13e4fc
b022958
0963ebd
569abc5
85a22b1
daa65ff
32a2411
0a5f85b
d40c975
8983c35
1f7c19d
f7be80a
7600401
ee853df
ed546e4
4819566
6ed8621
dacbf3f
f81e17a
6cf3622
08c2cde
6fa8703
f18e295
b55719f
8920c8f
54042b5
dba13c0
3a03294
9c70539
5018e90
cf47884
9cf72ee
f24cac5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this accurate?
Say we ran a semver-check over a crate where the detected bump is
ActualSemverUpdate::Major
. Wouldrequired_bump
actually beSome(ReleaseType::Major)
?If no bump is required, the value will be
None
, but is that the only time? I think there are other situations where the value might beNone
.Let's back this up with some tests? Consider making a new integration test file in the
tests/
directory to pin down the behavior here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need updating for the changes to the semantics of the struct's fields? It seems to me like some of these could be
assert
instead of comparisons.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right. I think it should never happen that the update of
detected_bump
is the same ofrequired_bump
, right?Maybe we can add some warnings in this case. Or do you prefer to write an assert? Sounds scary 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's assert. If our design behaves unexpectedly, it should fail loudly and quickly so we can figure out the failure mode and fix it.
I think
required_bump
should never be equal to or lesser thandetected_bump
in this design. If we're wrong about that, there's some serious issue we've overlooked and the outcome shouldn't be trusted anyway.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the assert in 9cf72ee