Skip to content
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

Rewrite validate.sh in Haskell #10317

Open
9999years opened this issue Sep 5, 2024 · 4 comments · May be fixed by #10320
Open

Rewrite validate.sh in Haskell #10317

9999years opened this issue Sep 5, 2024 · 4 comments · May be fixed by #10320
Labels
continuous-integration re: devx Improving the cabal developer experience (internal issue) type: enhancement

Comments

@9999years
Copy link
Collaborator

validate.sh is the entry-point to CI and local testing. validate.sh is needed because it's non-trivial to run tests otherwise.

However, validate.sh is a shell script, which limits its expressive power and maintainability.
I've been working on improving it with PRs like #10293 and #10315, but working with shell scripting idioms makes it much more difficult than it needs to be. Let's rewrite it as a simple Haskell script. I'm willing to do this if the maintainers OK it.

@9999years 9999years added the re: devx Improving the cabal developer experience (internal issue) label Sep 5, 2024
@philderbeast
Copy link
Collaborator

Are you considering using something like turtle?

@9999years
Copy link
Collaborator Author

@philderbeast Yes, but I'm not set on it if the maintainers have other preferences.

@philderbeast
Copy link
Collaborator

When generating a sha256map for nix, turtle came in handy and was easy to use so I'd be happy to see it used here. Another thing I did with Updo was offer the option to install each standalone *.hs script by listing them as executables in the package. That could help speed thing up for scripts called multiple times.

@ulysses4ever
Copy link
Collaborator

I'm in support. But we should try to think really hard of potential adversarial effects. Portability. Startup times. Downstream users including distributors like ghcup and nixpkgs (who may want to run it). Nothing jumps at me as a show stopper.

At least, probably, validate.sh should stay and turn into a one-liner calling validate.hs?

@9999years 9999years linked a pull request Sep 5, 2024 that will close this issue
2 tasks
9999years added a commit to 9999years/cabal that referenced this issue Sep 6, 2024
Closes haskell#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.
9999years added a commit to 9999years/cabal that referenced this issue Sep 6, 2024
Closes haskell#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.
9999years added a commit to 9999years/cabal that referenced this issue Sep 6, 2024
Closes haskell#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.
9999years added a commit to 9999years/cabal that referenced this issue Sep 6, 2024
Closes haskell#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.
9999years added a commit to 9999years/cabal that referenced this issue Sep 6, 2024
Closes haskell#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.
9999years added a commit to 9999years/cabal that referenced this issue Sep 6, 2024
Closes haskell#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.
9999years added a commit to 9999years/cabal that referenced this issue Sep 6, 2024
Closes haskell#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.
9999years added a commit to 9999years/cabal that referenced this issue Sep 6, 2024
Closes haskell#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.
9999years added a commit to 9999years/cabal that referenced this issue Sep 6, 2024
Closes haskell#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.
9999years added a commit to 9999years/cabal that referenced this issue Sep 6, 2024
Closes haskell#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.
9999years added a commit to 9999years/cabal that referenced this issue Sep 6, 2024
Closes haskell#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.
9999years added a commit to 9999years/cabal that referenced this issue Sep 7, 2024
Closes haskell#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.
9999years added a commit to 9999years/cabal that referenced this issue Sep 7, 2024
Closes haskell#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.
9999years added a commit to 9999years/cabal that referenced this issue Sep 7, 2024
Closes haskell#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.
9999years added a commit to 9999years/cabal that referenced this issue Sep 9, 2024
Closes haskell#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
continuous-integration re: devx Improving the cabal developer experience (internal issue) type: enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants