-
Notifications
You must be signed in to change notification settings - Fork 1
chore(tasty-hedgehog): Upgrade to 1.2.0 #349
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
Conversation
|
Note that this changes the test runner output to look like (just for the laws test of (Note the rather than the current The other option is to keep exactly the status quo, by following GaloisInc/what4#195 (comment) |
|
@dhess: this is based on your |
|
Thanks. You're probably correct that |
|
Looping in @georgefst and asking for his review to get his thoughts on this test output change. |
georgefst
left a comment
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.
Hmm, I'm not convinced that upstream have taken the best approach in qfpl/tasty-hedgehog#42. Wouldn't it have been better to e.g. patch Hedgehog to allow the whole recheck message to be hidden, for when it's embedded within some test runner like Tasty? As @brprice noted:
the instructions to rerun via tasty are correct, and are the supported way to run the tests
But this seems like the best thing we can do from down here.
|
OK then, I'll merge this after #244 is merged. |
df7e1ee to
89a6cfc
Compare
b1f2cfe to
14a5730
Compare
dhess
left a comment
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 think this looks fine, once the history is cleaned up. Thanks for tackling this un-fun work.
98b915e to
ce11a19
Compare
|
I have rebased onto main |
|
I apologize for waffling, but in light of all the |
|
Great, this is now ready to go modulo rationalizing the commit history. (Let's start over; I think it can be just one commit now.) (edit: Note for posterity — it was removing all the |
We would like to upgrade tasty-hedgehog to 1.2.0.0, but this introduces a change (deprecating `testProperty`) which forces large (mechanical) changes to our codebase, and an upgrade of tasty-discover to stay -Wall clean. It also needs configuration for hlint, to avoid lint errors. We separate these three upgrades into their own commits.
This is required to not complain about `tasty_...` custom name tests being not CamelCase. We currently do not have any of these in the codebase, but in the next commit we will migrate our tests to use this new feature of tasty-discover. That will enable us to upgrade tasty-hedgehog and avoid deprecation warnings. This change should only be necessary temporarily until hlint makes a new release (the development version of hlint no longer warns about `tasty_...` names, similarly to how hlint normally does not warn about `hprop_...` names) and haskell-language-server makes a new release incorporating this change (hls bundles its own version of hlint).
This doesn't change any behaviour. This is simply setup so we can upgrade tasty-hedgehog in the next commit and avoid deprecation warnings about `testProperty` (which tasty-discover emits for hprop_ tests).
Note that 'testProperty' has been deprecated in favour of 'testPropertyNamed'. This upstream change was to allow hedgehog and tasty to have different notions of the test's name: tasty wants a display name and hedgehog wants a top-level value that can be used with 'recheck' in ghci. Since (for Tests.Question.test_laws) we don't have such a value, we just use the static string "<internal-property>". Hopefully this means that the incorrect hedgehog instructions to 'recheck' any failing properties under 'test_laws' will be obviously wrong. Note that the instructions to rerun via tasty are correct, and are the supported way to run the tests. This is an improvement on the status quo where the 'recheck' instructions were less obviously incorrect.
3432f44 to
fdd533a
Compare
I have rebased to clean history. I kept it in 4 commits, to separate out the large mechanical change from the small interesting change, and also to separate out the hlint change so it is easy to revert later (see #544 ) |
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 all the rework.
@georgefst you may want to review this, as well. (edit: Oh, I see he already did, and presumably the PR has not changed materially since his review, so maybe no need, then.)
Upstream has deprecated
testPropertyin favour oftestPropertyNamed. To adapt to this change we additionallytasty-discoverso we can use the new customtasty_...tests instead ofhprop_..., sincetasty-discovergenerates code referencingtestPropertyfor those.hlintto avoid warnings thattasty_...should be CamelCased