Skip to content

Commit

Permalink
Improve formatting setup and fix devShells.ghc884 (#26)
Browse files Browse the repository at this point in the history
Closes #22, closes #23 and improves the necessary workarounds for #10
(previously Ormolu would have been built by `checks.formatting` and
`packages.default` even on `aarch64-darwin`, now it's never built)
  • Loading branch information
ngua authored Jan 12, 2023
1 parent 75b278c commit 41e6ffa
Show file tree
Hide file tree
Showing 4 changed files with 194 additions and 245 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,11 @@ $ cd ./vscode-inferno-syntax-highlighting

### Formatting all sources

To format all of the Nix and Haskell sources, run `nix fmt`. **Note**: this command assumes that certain executables are available on the `PATH`; please enter the development environment with `nix develop` before trying to run the formatter.
To format all of the Nix and Haskell sources, run `nix fmt`. Alternately, running `nix develop` and then the command `treefmt` in the development shell will perform the same formatting.

To run a formatting check that will fail if any files are not formatted, run `nix build -L .#check.<SYSTEM>.formatting`.
To run a formatting check that will fail if any files are not formatted, run `nix build -L .#check.<SYSTEM>.treefmt`.

**NOTE**: Ormolu currently segfaults during compilation on `aarch64-darwin` (M1 Macs). `ormolu` is accordingly omitted from the formatter (`formatters.aarch64-darwin`) and formatting check (`checks.aarch64-darwin.treefmt`). CI will still fail on unformatted Haskell sources as it runs on `x86_64-linux`, so it is recommended to install `ormolu-0.5.0.1` on your system using an alternate source. See https://github.com/plow-technologies/inferno/issues/10 for more.

## Golden Files

Expand Down
67 changes: 13 additions & 54 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 41e6ffa

Please sign in to comment.