Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Minimum Viable Product for tree-tremble #239

Closed
3 of 4 tasks
snowleopard opened this issue May 6, 2016 · 10 comments
Closed
3 of 4 tasks

Minimum Viable Product for tree-tremble #239

snowleopard opened this issue May 6, 2016 · 10 comments
Labels
Milestone

Comments

@snowleopard
Copy link
Owner

snowleopard commented May 6, 2016

After a Hadrian's-Wall-long discussion in #232, it looks that it will be best to postpone the Great Merge (the tree-tremble milestone) until Hadrian meets the Minimum Viable Product requirements.

Let us agree on what this MVP is. The current list includes the following (I will keep updating it as we go):

Please let me know if the above list needs any changes.

The list of current limitations is here: https://github.com/snowleopard/hadrian#current-limitations.

Note, the above effort estimates are based on my abilities and availability. I'm sure other people could do it faster, and if they volunteer to help I will amend the estimates.

Items removed from the list:

@snowleopard snowleopard added this to the tree-tremble milestone May 6, 2016
@ndmitchell
Copy link
Collaborator

  • I would add cross-compilation to the list (probably not hugely difficult, but if it shows up weaknesses in the overall architecture you'll want to get them addressed before the merge).
  • I would remove the documentation requirement. The overall "principles" are covered in the paper we wrote. The details are covered in the code. I'm sure additional docs will help everyone, but having them produced on-demand even after merging seems fine. The old system required docs precisely because it wasn't compositional, the new one is just a bunch of disjointed stuff, none of which is too confusing in isolation.

@snowleopard
Copy link
Owner Author

@ndmitchell Thanks, I agree. I've amended the list.

@snowleopard
Copy link
Owner Author

This goes very slowly, but now we've got source distribution rules, #219.

snowleopard added a commit that referenced this issue Jan 7, 2017
snowleopard added a commit that referenced this issue Jan 12, 2017
@goldfirere
Copy link

Posting here as requested on ghc-devs: A really useful feature of the build system today is that I can make 2 in the ghc subdirectory and get a very fast rebuild. In particular, no dependency-checking is done (which takes several seconds). I would be quite disappointed to see this (admittedly unsafe) feature be dropped.

It is also convenient to tell the build system to target just one specific file (e.g., libraries/base/dist-build/.../Data/Type/Equality.o), which I've done when building that file with stage-1 fails and I'm debugging stage-1. I could probably live without this feature though.

@snowleopard
Copy link
Owner Author

snowleopard commented May 10, 2017

Thanks @goldfirere!

Freezing Stage1 is a popular feature and has already been requested -- see #250. We will provide an equivalent in Hadrian.

Rebuilding a single file is already possible by specifying its name as the build target, i.e. hadrian target, but at the moment this will also trigger rebuilds in Stage1.

@goldfirere
Copy link

This isn't just about freezing stage 1. It's about re-building just the compiler (no libraries) and skipping the time-consuming dependency analysis.

@snowleopard
Copy link
Owner Author

@goldfirere I see, thanks. If I understand correctly, the freeze feature should be flexible enough to freeze different sets of build artefacts: whole stages, packages, etc.

One simple way to support such custom freezing is via predicates, e.g. having a user setting freeze:

freeze :: Predicate
freeze = return False -- default setting: freeze nothing

freezeStage1 :: Predicate
freezeStage1 = stage0 -- freeze all artefacts built by the bootstrapping (Stage0) compiler

freezeAllButCompiler :: Predicate
freezeAllButCompiler = not <$> package compiler -- freeze all packages expect compiler

These predicates can be composed as explained here:

https://github.com/snowleopard/hadrian/blob/master/doc/user-settings.md#verbose-command-lines

@simonmar
Copy link

make 2 is a combination of freezing stage 1 for the duration of this build and building a single target (the compiler). @snowleopard we need to be able to specify what to freeze from the command line, in addition to having a user setting.

@snowleopard
Copy link
Owner Author

@simonmar How critical is the ability to specify such settings via the command line? Isn't the ability to select a user build flavour from the command line sufficient?

@snowleopard
Copy link
Owner Author

Hadrian has been merged, so I think we can close this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants