-
Notifications
You must be signed in to change notification settings - Fork 704
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
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
cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/ImpossibleVersionRangeLib/cabal.out
Outdated
Show resolved
Hide resolved
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
498ca97
to
a7ba282
Compare
cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/ImpossibleVersionRangeLib/cabal.out
Outdated
Show resolved
Hide resolved
cabal-testsuite/PackageTests/Check/PackageFiles/VersionBounds/cabal.out
Outdated
Show resolved
Hide resolved
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! |
d767d43
to
0d787e3
Compare
5dcdb5b
to
d59f4fc
Compare
Ping me when this is ready, almost everything I see is very good. |
@ffaf1 I've moved all of the dependency version range checks to
As for missing bounds checks, I don't think we have any duplication:
Footnotes
|
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.
Thanks for the excellent work!
Label merge+no rebase is necessary when the pull request is from an organisation. |
Thanks for the thorough reviews @ffaf1. |
- 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 - Update test expectations with --accept in other tests - Use inclusive lower bound for issue-8646.cabal - Satisfy the parsimonious test for messages - Allow exceptions to 25 char limit explain ids - Rename Is* to Has* to match previous predicates - Move predicates to VersionRange module - Add changelog - Remove unit-test guards that aren't needed - Shorten check IDs - Add warnings to cabal check section of user guide - Terminate bulleted list with full stop - Remove links to pvp.haskell.org - Note version constraint guidelines and mistakes - Add listSep - Reuse queryVersionRange - Bundle pattern synonyms with VersionRangeF - Add doctest docs for version range predicates - Used named chunk for predicate examples - Add predicate subsections for types of bounds - Change lte- to le- prefix - Satisfy fourmolu - Flip sense of LE and GT haddocks - Drop Has prefix on patterns, use LE not LEQ - avoid name clash with has*Bound (VersionRange -> Bool) predicates - use TZ not TrailingZero, a two-letter prefix like the other two - Test expectations with shorter check messages - Remove unused LANGUAGE pragmas - Satisfy hlint - Promote to haddocks, move NOTE about dashes - Rerun --accept test to generate VersionBound/cabal.out - rewrite was not triggered by only a trailing whitespace differerence - Fixup version range of ImpossibleVersionRangeLib - Fixup version range of NonConfCheck/PackageVersionsInternal - Fixup version range of NonConfCheck/PackageVersionsInternalSimple - Fixup version range of NonConfCheck/PackageVersionsLibInt - Fixup version range of NonConfCheck/PackageVersionsStraddle - Fixup version range of NonConfCheck/SetupBounds - Move to DepVersionRange/VersionConstraintOperators - Move to DepVersionRange/UnboundedInternalDep - Move to DepVersionRange/InternalLibDep - Move to DepVersionRange/BaseDep - Move to DepVersionRange/CustomSetupBaseDep
ee33aa2
to
d46f325
Compare
@Mergifyio backport 3.14 |
✅ Backports have been created
|
Fixes #9806. Checks that lower bounds are inclusive, upper bounds are exclusive and don't have trailing zeros.