Rather than a homebrewed approach, we can use `make` to figure out when
it's necessary to regenerate our venv.
This Makefile will regenerate _requirements.txt_ from
_requirements-top-level.txt_ when the latter is changed.
It will also regenerate the venv when _requirements.txt_ is changed
(i.e. changes are pulled, or it's regenerated as described above).
`make` uses file/directory timestamps to figure out what to rebuild.
This is probably more reliable than expecting people to update a version
number whenever they change a file.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5152
GitOrigin-RevId: 24b27d49bf6c4ba1d57ac38ea38ae278216c6d66
I intend to use the Make targets around starting and stopping backend databases in order to wrap the Python integration tests in targets.
To that end, I have:
1. Factored out test infrastructure targets into _test-infrastructure.mk_.
2. Actually run the functions from _util.sh_; previously we were just running a bash script with no explicit commands. _util.sh_ must be `source`d and then you invoke the relevant function.
3. Run `docker-compose` through Nix if possible.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5136
GitOrigin-RevId: d7a01958045a82199c969ec3f88387d7d76d254b
You can now run `nix fmt` (or `make format-changed`) to reformat Nix
files.
This is not enforced by CI.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4754
GitOrigin-RevId: a2e7cbe6c037d68ba6303278616314de60b6aa72
In the interest of having a single command to run before committing in order to check for basic errors, I propose `make lint-changed`.
This enhances `make lint` and `make lint-changed` to run `ormolu` and `shellcheck`, in line with CI.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4727
GitOrigin-RevId: 05c860a86ce40b0f52c6aa2d333c0af23aea070e
* `make lint-hs` will lint all files.
* `make lint-hs-changed` will lint all modified files on this branch.
* `make lint` will delegate to `make lint-hs`.
* `make lint-changed` will delegate to `make lint-hs-changed`.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4720
GitOrigin-RevId: d872f5b672b1d06100cd9fdaa5e60dc8bb5cae86
### Description
- sets up a Makefile target for running ormolu to format and check source code
- updates CI to run ormolu instead of stylish-haskell (and to check instead of format actively)
Compare #1679.
Here's the plan for merging this:
1. merge this PR; at this point, all PRs will fail CI unless they have the `ignore-server-format-checks` label set
2. merge follow-up PR #2404 that does nothing but actually reformats the codebase
3. tag the merge commit as `post-ormolu` (also on `graphql-engine`, for the benefits of community contributors)
4. provide the following script to any devs in order to update their branches:
```
$ git checkout my-feature-branch
$ git merge post-ormolu^
$ make format
$ git commit -a -m "reformat with ormolu"
$ git merge -s ours post-ormolu
```
(I'll put this in the commit message)
https://github.com/hasura/graphql-engine-mono/pull/2020
Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
Co-authored-by: Swann Moreau <62569634+evertedsphere@users.noreply.github.com>
GitOrigin-RevId: 130f480a6d79967c8d045b7f3a6dec30b10472a7