[GHC] #16069: Proposal to resolve some confusion about stages in Hadrian

#16069: Proposal to resolve some confusion about stages in Hadrian -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The current situation with hadrian is that 1. We build libraries required to build the stage2 compiler with stage1 and place them in `_build/stage1`. 2. The `stage2` compiler is built with `stage1` and then placed in `_build/stage1`. 3. Executables built using the `stage2` compiler such as haddock then also use the libraries built by the `stage1` compiler even though they are being built with the `stage2` compiler. However, this is problematic because when you want to build a `stage3` compiler, we want to actually build the libraries again using the `stage2` compiler and place them in `_build/stage2`. If we follow the existing logic for executables built using the `stage2` compiler then in order to build a `stage3` compiler we would just reuse all the libraries from `_build/stage1` which seems incorrect. The proposal is simply thus: 1. When building an executable at stageN, we use libraries also built at stageN. Concretely, if we want to build `haddock`, a stage2 executable, then we also have to build all the libraries it needs with the `stage2` compiler and install them into a package database in `_build/stage2`. 2. The definition of "build" can be configured. By default, in order to "build" a stage2 library we copy it from the stage1 database but it is configurable to rebuild it with the stage2 compiler as we would want to for stage3. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16069 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16069: Proposal to resolve some confusion about stages in Hadrian -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 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: | -------------------------------------+------------------------------------- Changes (by alpmestan): * cc: alpmestan (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16069#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16069: Proposal to resolve some confusion about stages in Hadrian -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 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: | -------------------------------------+------------------------------------- Changes (by harpocrates): * cc: harpocrates (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16069#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16069: Proposal to resolve some confusion about stages in Hadrian -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 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): This simplification is something I wanted to do for a while, but there is an important question to answer: are we going to build Haddock using Stage1 GHC or Stage2 GHC? The Make build system builds Haddock using Stage2 GHC. I therefore copy my question from the GitHub issue (https://github.com/snowleopard/hadrian/issues/661): We know that building Haddock with Stage1 GHC works, but is this the right thing to do? Why does the Make build system uses the Stage2 GHC to build Haddock? Is it OK for Hadrian to deviate from Make in this respect? If the answer to the above is "It is OK for Hadrian to use Stage1 GHC to build Haddock" then I'll happily support this proposal. However, if the answer is "Hadrian must also use Stage2 GHC to build Haddock" then I'm afraid this proposal means significantly longer build times, since now we'll need to build Stage2 libraries, just in order to build Haddock and docs. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16069#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16069: Proposal to resolve some confusion about stages in Hadrian -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: fixed | 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: | -------------------------------------+------------------------------------- Changes (by mpickering): * status: new => closed * resolution: => fixed Comment: Merged here: https://gitlab.haskell.org/ghc/ghc/commit/6486c6e49c53e75f37ed732b38c5be7ae6... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16069#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16069: Proposal to resolve some confusion about stages in Hadrian
-------------------------------------+-------------------------------------
Reporter: mpickering | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.3
Resolution: fixed | 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 Matthew Pickering
participants (1)
-
GHC