[GHC] #16242: Hadrian is too aggressive in rebuilding
GHC
ghc-devs at haskell.org
Mon Jan 28 00:06:35 UTC 2019
#16242: Hadrian is too aggressive in rebuilding
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Build System | Version: 8.6.3
(Hadrian) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by snowleopard):
> Edit a comment in one file.
> [...]
> What happens though is that stage-1 is rebuilt
Wait, this doesn't sound right. Which file did you edit? Here is what
should have happened: the corresponding compiler should have been rerun
generating the same object file, at which point the rebuild should have
stopped (we call this feature "early cutoff"). Are we hitting GHC non-
determinism here, i.e. the resulting object file was different after
editing a comment?
> Restore the LAX_DEPENDENCIES feature. I don't know the specification of
that feature, but my experience is that it just did the Right Thing
Although I agree that having a flag that does the Right Thing would be
useful, I'd like to point out that Hadrian provides a general mechanism
for skipping the rebuild of any collection of files. `--freeze1` simply
uses this mechanism by skipping everything in `stage0//*`. Here is the
corresponding code fragment:
https://gitlab.haskell.org/ghc/ghc/blob/10faf44d97095b2f8516b6d449d266f6889dcd70/hadrian/src/Main.hs#L30-31
You can specify the files that should be ignored from the command line
using `--skip` flag. For example, the equivalent of the flag `--freeze1`
is `--skip=stage0//*`.
> Somewhat separately, it might be nice to package up common idioms into
smaller command lines.
I think "build flavours" are the intended mechanism for common idioms,
although typing `--flavour=...` is indeed inconvenient. We could add a
shorthand `-f` for this.
Separate scripts for such idioms sounds like a plausible approach too,
although there is a risk that having multiple ways to do the same thing
may be confusing.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16242#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list