Draft: Merge Haddock submodule into GHC tree
We have long had an uneasy handling of GHC's Haddock dependency. While Haddock is technically a separate downstream project of GHC, it is also tightly-coupled enough that GHC maintainers have often been the source of a significant number of contributions and the maintaining consistency with the GHC library required that we track Haddock as a submodule.
However, submodules also carry a high cost. In the case of GHC contributors, there is a large documentation cost to describe the submodule workflow and an associated learning curve.
Consequently, here we carry out the proposal of #23178 (closed), merging the Haddock project into the GHC tree. This was accomplished using git subtree
although we did need to rewrite the history of the ghc-head
branch to fix a few very old broken commits. The source branch can be found as https://gitlab.haskell.org/ghc/haddock/-/commits/ghc-subtree-import-aug-2023. This branch was produced via:
$ git fast-export ghc-head > history
$ patch -R < fix-history.patch
$ git fast-import < history
With the following patch:
--- history 2023-08-07 13:42:36.114869612 -0400
+++ history 2023-08-07 16:06:14.702481642 -0400
@@ -544039,8 +544039,8 @@
commit refs/remotes/gitlab/ghc-head
mark :1518
-author David Waern <davve@dtek.chalmers.se> 1176239316 +0000
-committer David Waern <davve@dtek.chalmers.se> 1176239316 +0000
+author <davve@dtek.chalmers.se> 1176239316 +0000
+committer <davve@dtek.chalmers.se> 1176239316 +0000
data 29
Add version to ghc dependencyfrom :1516
M 100644 :1517 haddock-ghc.cabal
@@ -544138,8 +544138,8 @@
commit refs/remotes/gitlab/ghc-head
mark :1520
-author David Waern <davve@dtek.chalmers.se> 1176241028 +0000
-committer David Waern <davve@dtek.chalmers.se> 1176241028 +0000
+author <davve@dtek.chalmers.se> 1176241028 +0000
+committer <davve@dtek.chalmers.se> 1176241028 +0000
data 30
Change package name to haddockfrom :1518
D haddock-ghc.cabal
@@ -544238,8 +544238,8 @@
commit refs/remotes/gitlab/ghc-head
mark :1522
-author David Waern <davve@dtek.chalmers.se> 1177374134 +0000
-committer David Waern <davve@dtek.chalmers.se> 1177374134 +0000
+author <davve@dtek.chalmers.se> 1177374134 +0000
+committer <davve@dtek.chalmers.se> 1177374134 +0000
data 40
Use filepath package instead of FilePathfrom :1520
M 100644 :1521 haddock.cabal