-
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
Convert validate.sh
to a Haskell script
#10320
Conversation
I wonder if it can be just a cabal script... But this is not crucial at the moment. |
I hope I'm not jumping the gun with a pull request in draft but HLint is gagged1 and could help. We suppress a lot of HLint suggestions at the root :-( Lines 1 to 95 in 3a6f73e
Side-stepping that configuration that ignores 94 suggestions lets HLint come forward with a few suggestions:
Footnotes
|
@ulysses4ever, it could be but unfortunately it can't also be a script. It can't be both an installable executable and a script (but I wish it could), reported as #10324. |
0836b6c
to
d691b45
Compare
e570576
to
29a9aa9
Compare
29a9aa9
to
b44e289
Compare
94598c5
to
8155d24
Compare
It's on my radar but I'll only get to it the next week I'm afraid |
7331115
to
c083b22
Compare
Nothing requires this to be the case; we could easily do |
The new dependencies are
|
It seems like the |
This seems to fix an error where `long-tests` isn't built?
Oh, thanks for pointing that out! I only got as far as the package home page on Hackage, which lists the dependencies without mentioning the constraints. |
@ulysses4ever @mpickering I'd appreciate if you could take a look at my responses and see if it looks good or if there's anything else we should address before merge. Thanks! |
Yes, sorry, I meant to post it yesterday: I don't have any other comments and think it can be handed over to the merge bot. |
Switched the merge label: mergify just balked at queueing it. |
@mergify backport 3.12 |
✅ Backports have been created
|
* Convert `validate.sh` to `cabal-validate` Closes #10317. A Haskell script will be easier to maintain and expand than the existing Bash script. This also adds a `--pattern PATTERN` option which lets you filter tests across all test suites. (cherry picked from commit 582a5c7) # Conflicts: # validate.sh * Split `cabal-validate` into modules This disentangles the utility boilerplate from the validation logic, making the `Main.hs` module much easier to read and modify. (cherry picked from commit 43a3975) * cabal-validate: Add Haddock documentation + README (cherry picked from commit e257591) * Remove `ansi-terminal` dependency (cherry picked from commit 96d6ad5) * Use `unlines` in `printConfig` (cherry picked from commit 9f5d90f) * optsParser -> rawOptsParser (cherry picked from commit a10a2a3) * withTiming: take `startTime` explicitly (cherry picked from commit 37cfe85) * Add `cabal-validate` to `format` job (cherry picked from commit 92613f0) * Build test suites explicitly This seems to fix an error where `long-tests` isn't built? (cherry picked from commit d208282) * fixup! Remove `ansi-terminal` dependency (cherry picked from commit bae200a) * fixup! Build test suites explicitly (cherry picked from commit 1900d5e) * fixup! fixup! Build test suites explicitly (cherry picked from commit 30f0faa) * fix pointless validate conflict since it's going away * 3.12 doesn't have Cabal-hooks --------- Co-authored-by: Rebecca Turner <[email protected]> Co-authored-by: brandon s allbery kf8nh <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Closes #10317.
A Haskell script will be easier to maintain and expand than the existing Bash script.
This also adds a
--pattern PATTERN
option which lets you filter tests across all test suites.I've kept the new script's behavior as close to the old script's behavior as possible, to reduce design discussion on this PR.
TODO
cabal-validate/README.md
to make it obvious where to look for logic and how to interact with the programFuture work
tasty
args (currently--hide-successes
)--list-steps
only lists the steps that are enabled with the given command-line options, not all possible steps;./validate.sh --list-steps
and./validate.sh --list-steps --run-cli-suite
give different results! (This is an existing bug in the old script.)lib-tests
step runs five different test suites, making it take much longer than necessary to reproduce test failures.--help
output could use some love; it wasn't very clear to me what various commands do.--keep-going
mode to ignore failures and continue executing tests/suites.