hadrian-util: An experiment in a more usable hadrian UX

Richard Eisenberg rae at richarde.dev
Mon Jan 6 11:15:24 UTC 2020

This looks really useful, and might bridge the gap between the UX I'm used to and Hadrian, allowing me to adopt Hadrian sooner than I otherwise would. However, I would be disappointed to see hadrian-util still in active use when `make` is removed (#17527). I'm glad to see Ben's %Make removal milestone, which gives me more confidence that we'll wait until hadrian is really ready for prime-time before removing the old build system.


> On Jan 5, 2020, at 6:30 PM, Ben Gamari <ben at well-typed.com> wrote:
> Hi everyone,
> For the past few months I have been using Hadrian for the majority of my
> GHC builds. In due course I have encountered a few papercuts:
> * hadrian/cabal.build.sh is quite wordy (#16250); moreover, you need to
>   be in the source root to invoke it (#16667)
> * editing hadrian.settings is quite difficult due to the lack of
>   availability of tab-completion in vim
> * maintaining multiple build roots is quite error-prone since you must
>   remember which build flavour you used for each (#16481, #16638)
> * there is no equivalent to setting `stage=2` in `mk/build.mk` to make
>   the stage-1-freeze persistent
> To address these I cobbled together a small wrapper, hadrian-util. I
> have this installed in my home-manager environment with a shell alias,
> `hu`, meaning that building GHC is as easy as typing `hu run` anywhere
> in the tree.
> As discussed in the README, `hadrian-util` supports multiple build
> roots, has a moderately convenient interface for manipulating
> hadrian.settings (with completion!) and has enough persistent state to
> eliminate most of the error-prone boilerplate from Hadrian invocations
> without being confusing.
> There is the question of what the long-term future of hadrian-util
> should be. Arguably it is merely a hack papering over some of the
> shortcomings of Hadrian's current UX; perhaps eventually these will be
> fixed. However, in the meantime, I've found that hadrian-util makes
> hadrian quite pleasant to use.
> I hope others also find this useful.
> Cheers,
> - Ben
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

More information about the ghc-devs mailing list