-
Notifications
You must be signed in to change notification settings - Fork 697
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
Additional version bound checks #10554
base: master
Are you sure you want to change the base?
Conversation
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.
Cool!
e090e69
to
b451782
Compare
cabal-install/tests/UnitTests/Distribution/Solver/Modular/DSL.hs
Outdated
Show resolved
Hide resolved
cabal-testsuite/PackageTests/Check/PackageFiles/VersionBounds/cabal.out
Outdated
Show resolved
Hide resolved
And of course, if something is not clear in the checks scaffold, ask! |
Converted to draft as I think there's more work to do:
|
8ca45cf
to
b2e539b
Compare
edf1712
to
50313b1
Compare
Thanks, most likely I will review this this weekend. |
50313b1
to
d40acfd
Compare
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.
Excellent work.
I have some things I don't agree with and I was overt in my thoughts (apologies if I missed some of your earlier notes).
I am sure we can work together to make this in master
speedily~
cabal-testsuite/PackageTests/Check/PackageFiles/VersionBounds/cabal.out
Outdated
Show resolved
Hide resolved
These warnings may cause trouble when distributing the package: | ||
Warning: [trailing.zero(*.0)-upper-bounds] On library, these packages have upper bounds with trailing zeros: | ||
- pkg | ||
Please avoid trailing zeros for upper bounds. There is more information at https://pvp.haskell.org/ |
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.
That this Please avoid
line is not indented below the Warning:
line breaks the itemization of each warning for me.
cabal-install/tests/UnitTests/Distribution/Solver/Modular/DSL.hs
Outdated
Show resolved
Hide resolved
cabal-testsuite/PackageTests/Check/PackageFiles/VersionBounds/cabal.out
Outdated
Show resolved
Hide resolved
7be19e7
to
5bef5e7
Compare
@philderbeast is this ready for a re-review? (no fret if it is not) |
5bef5e7
to
7e74f9c
Compare
@ffaf1 I've rebased and this is ready for review. |
d39851e
to
498ca97
Compare
-- NOTE: Satisfy the Parsimonious test, a test that checks that these messages | ||
-- don't have too many dashes: | ||
-- $ cabal run Cabal-tests:unit-tests -- --pattern=Parsimonious |
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.
Erase this, not needed anymore.
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.
It is actually a helpful note. Other than failing the test there's no indication of this restriction other than recognizing a pattern that the other CheckExplanationIDString
have no more than two dashes. I'll move the note near the type signature, alongside the other note there.
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.
Add it where it belong then, near the test code Cabal-tests/tests/UnitTests/Distribution/PackageDescription/Check.hs
(and jus a reference from …/Check/Warning.hs
.
I have added a few more comments @philderbeast. If you need help or are ready for another review, just ping me and I will chime in! |
a7ba282
to
322328c
Compare
- Check for LEQ upper bounds - Check for GT lower bounds - Check for trailing zero upper bounds - Add missing gtLowerBound to checks - Handle ^>= versions with its IntersectVersionRangesF - Set baseline for cabal init generated bounds - Use recursive functions for checking bounds - Handle union version ranges
- Used named chunk for predicate examples - Add predicate subsections for types of bounds
- avoid name clash with has*Bound (VersionRange -> Bool) predicates - use TZ not TrailingZero, a two-letter prefix like the other two
d767d43
to
0d787e3
Compare
Fixes #9806. Checks that lower bounds are inclusive, upper bounds are exclusive and don't have trailing zeros.