-
Notifications
You must be signed in to change notification settings - Fork 703
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 invertVersionRange and invertVersionIntervals to Distribution.Version #2382
Conversation
Looks OK, but can you please make all lines fit into 80 columns? |
This module is one of the few modules in Cabal that does actually have proper QuickCheck tests. Would you mind adding properties for the new functions that specify what they do. It should be straightforward given the interpretation as not within a version range. It's quite easy to get these bits of code wrong, I certainly did with the originals in the module (and was surprised that one property I expected to hold does not), so I think it's worth doing. |
I looked for these but they seem to have been lost in the transition to git. For example, the darcs repo had a directory Cabal/tests/Test/Distribution but the git repo does not. |
@ddssff oh you're right. Let's blame @tibbe :-)
@ddssff Would you be kind enough to resurrect this test module? |
I'm surprised that travis build passed - the parsing and pretty printing tests fail here. And when I click on Details it says the build finished a month ago... |
Ugh, I need to change the signature of foldVersionRange and friends. |
@ddssff wait, why did you need to add InvertVersionRange as a full-on data constructor for VersionRange? I didn't notice you adding explicit syntax for it, I thought it was purely an operation. If you keep it as before in your first patch-set then you don't need to change the fold function. |
I would be happy to not create a constructor and not change the fold function. I wasn't sure whether it was necessary. |
@ddssff Ok. Yes, I think adding a constructor and changing the fold are not necessary. It can be purely an operation and not syntax. |
Two of the quickcheck properties are failing for the ghc-7.4 build only, but they are not related to invert. Should I disable them, disable the 7.4 travis run, ifdef them, or leave them be? Or make the 7.4 run an allowed failure. |
Oh? Which ones? I guess we could disable them for now, but we're likely to just forget if we do. Great work in resurrecting the tests! Much appreciated. |
Glad to help with the tests - these are the failing results:
Which correspond to these properties:
Is it worth worrying about tests that only fail under 7.4? |
Reference #925