Hadrian: introduce userDefaultFlavour, making default flavour overridable
ClosedPublic

Authored by alpmestan on Dec 14 2018, 8:13 AM.

Details

Summary

This patch introduces the userDefaultFlavour user setting. It should
be the name of the default flavour to use when no --flavour argument is
passed. Before this patch, we would just always default to... the default
flavour. With this patch, we default to whatever Flavour whose name is
userDefaultFlavour, therefore providing a way for users to "persist" their
choice of flavour, not having to repeat --flavour=[...] in every hadrian
command.

Test Plan

Set userDefaultFlavour = "quickest", run hadrian/build.sh, check
that the quickest flavour is indeed picked.

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
alpmestan created this revision.Dec 14 2018, 8:13 AM

Thanks Alp, this will be useful. Please can we update the wiki page as well when this is merged.

Thanks Alp, this will be useful. Please can we update the wiki page as well when this is merged.

Glad you'll find that useful! I'm hoping we get around to implementing the rest of Trac #15890 soon.

Regarding the wiki page, well it'll be a bit annoying to maintain both the wiki page and the in-tree docs in sync (in fact the in-tree docs are already ahead, the wiki doesn't have some recent features). I can certainly do it for a while if that helps but I think with the move to gitlab etc, the idea is to move more and more docs in the source tree.

Is there somewhere to view a rendered up-to-date copy of the documentation? If there's not then this doesn't seem like a great idea.

Github and Gitlab both render hadrian's hadrian/README.md as well as the more specific documents under hadrian/doc/, e.g https://github.com/ghc/ghc/tree/master/hadrian#hadrian or https://gitlab.staging.haskell.org/ghc/ghc/tree/master/hadrian#hadrian.

snowleopard accepted this revision.Dec 15 2018, 9:55 AM

Looks good to me, thank you!

Regarding docs, just to reiterate my position: I think having two copies of documentations that are not in sync and use different versions of markdown is just not a very productive state of affairs. So we'll have to choose only one: in which case the versioned docs would be easier to maintain, review, etc.

Looks like GitLab renders our current docs perfectly well. Also, like GitHub, it shows the file dir/README.md when navigated to a directory dir, which is very convenient. We'll just add hadrian/doc/README.md as an TOC for all available Hadrian documentation, making it easier to discover.

This revision is now accepted and ready to land.Dec 15 2018, 9:55 AM
This revision was automatically updated to reflect the committed changes.