Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,400
    • Issues 5,400
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 590
    • Merge requests 590
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #16769
Closed
Open
Issue created Jun 06, 2019 by Alp Mestanogullari@alp🦑Owner

Improving the Hadrian user experience

With the Make build system there are three ways to configure a GHC build:

  1. easily override ~all options on the command line
  2. easily override ~all options in a simple key-value file (mk/build.mk)
  3. easily override ~all options with environment variables

This makes GHC usable to both developers (who desire the ability to easily reconfigure their tree on an ad-hoc basis) and packagers (who want the ability to change a few configuration options in an automated manner).


On the other hand, with Hadrian, we pass some options on the command-line, some options through the UserSettings module/mechanism (in particular by defining custom Flavours, for eveything that has to do with GHC options, build ways, etc), there's a little bit of env var sensitivity (e.g the TEST env var) too.

It is also pretty tricky to programmatically edit/generate UserSettings.hs, so even if we could customize everything we want there (we can't, e.g all the things that we can tweak on the command-line that don't have a Flavour/UserSettings.hs equivalent, like --freze1 or all the --test-* CLI options), that would not be a satisfactory solution for many GHC developers. A particular "subproblem" is the lack of a solution to always pass some options to Hadrian itself! See #15890, that this ticket supersedes.


Hadrian as it is today therefore seems to suffer from a few issues:

  • it's hard for packagers to use and pretty much requires that they know Haskell "well enough"
  • it's hard for developers to change the build configuration in one-off ways (see e.g #16267 (closed))
  • configuration is scattered in a few places (command line options, user settings (incl. flavour), environment variables)
  • configuration is hard to discover

All in all, this makes me think we want a more uniform solution for customizing build configurations, which Hadrian's Args DSL + UserSettings/Flavour mechanism doesn't offer. It can stay around but doesn't seem like the best we can offer to users in terms of UI, for the reasons outlined above. A reasonable UI might be a key=value style syntax, as GHC devs and packagers from all backgrounds would quite likely find it familiar, and that would make builds easily configurable from the command-line, the environment and files (à la build.mk), therefore bringing Hadrian to a point where it could finally support 1., 2. and 3. from the beginning of this ticket.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking