Version 0.0.18 has been released.
Highlights:
-
A new
editcommand. A lot of the power of garn, where it almost feels likegarn.tsfiles write themselves, comes from IDE integration. Because we use Deno instead of the more traditional Node, a lot of people don’t have their editors set up fully yet. We previously had a garnExecutable,editGarnConfig, that you could expose for users. But that had problems, such as being less discoverable, and breaking if yourgarn.tsfile was broken. Now, we made editing a built-in. This means you can just rungarn editand you’ll opengarn.tson an editor configured with autocompletion and other features. Currently the only editor option is VSCodium, but we’re very open to PRs - see this file. -
garn no longer ignores untracked files. Previously you’d get confusing errors about files missing if you hadn’t yet
git added them. This was because (controversially) Nix behaved similarly. We submitted a patch to Nix, and made garn already use that patch. - Multiple executables in Haskell projects. Previously you needed exactly one executable, which was quite arbitrary and confusing. Now any number of executables, including none, is supported.
-
Make
garn initadd executables to Haskell projects based on the executables listed in the cabal file. - Overriding Haskell dependency versions. Now you can write, for example:
export const project = haskell.mkHaskellProject({
description: "",
compiler: "ghc94",
src: ".",
executables: ["foo"],
// This is new
overrideDependencies: {
"string-conversions": "0.3.0.3",
},
})
And you get the correponding version from Hackage, rather than the default one from the package set. This is as easy as Stack, but with the power of Nix.
-
garn entertop-levelEnvironments. PreviouslyEnvironments, unlike everything else, didn’t really work at the top-level, and instead had to be part of aProject.