Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bazelify ghc-lib #12508

Merged
merged 65 commits into from
May 19, 2022
Merged
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
6697b33
Import sources of ghc-lib-gen and DA's GHC fork
aherrmann Dec 23, 2021
ec68605
Build the ghc-lib-gen binary
aherrmann Dec 23, 2021
f230356
Helper rules to expose tools to genrules
aherrmann Dec 23, 2021
69076c5
Import ghc-lib tool dependencies from Nix
aherrmann Dec 23, 2021
f34a0ad
Build the ghc-lib-parser sdist with Bazel
aherrmann Dec 23, 2021
87a14ad
Build the generated ghc-lib-parser with Bazel
aherrmann Dec 23, 2021
70ecbfd
Add the new ghc-lib-parser to stack_snapshot
aherrmann Dec 23, 2021
a065e60
Build the ghc-lib sdist with Bazel
aherrmann Dec 23, 2021
18840cc
Build new ghc-lib with Bazel and inject into stack_snapshot
aherrmann Dec 23, 2021
2975d8a
Test that the checked in Cabal files are up-to-date
aherrmann Dec 23, 2021
de84a6b
Deduplicate ghc-lib{,-parser} sdist generation
aherrmann Dec 23, 2021
1599228
Handle path list separator on Windows
aherrmann Dec 23, 2021
9f40753
Install ghc-lib tool dependencies via msys2
aherrmann Jan 6, 2022
2ebe765
msys2 fix perl installation
aherrmann Jan 7, 2022
667b3b5
Define dadew_binary_bundle to import a binary_bundle from dadew
aherrmann Jan 6, 2022
d9a88a0
Add ghc-lib tool deps on Windows
aherrmann Dec 23, 2021
c868978
set SSL_CERT_FILE for git submodule fetch
aherrmann Jan 20, 2022
b1a3c15
MacOS: Provide ar binary for ghc-lib
aherrmann Jan 20, 2022
503d702
DEBUG
aherrmann Jan 21, 2022
da343fb
Add versioned autoconf tools
aherrmann Feb 10, 2022
fc11a05
Download msys2 packages explicitly
aherrmann Feb 10, 2022
e046797
Fix git path
aherrmann Feb 10, 2022
845210c
Update ghc-lib
aherrmann Feb 10, 2022
ac45869
Update GHC
aherrmann Mar 17, 2022
8cb5bde
Avoid warning "dependency checking of directories is unsound"
aherrmann Mar 24, 2022
6b70246
Update GHC revision for ghc-lib
aherrmann Apr 7, 2022
835f052
update Cabal files
aherrmann Apr 7, 2022
fa0d63a
Fix ghc-lib-parser sdist reference
aherrmann Apr 7, 2022
4ee3b2d
Take tar from PATH in unpack_tar
aherrmann Apr 7, 2022
608b693
msys2 explicit gzip installation
aherrmann Apr 7, 2022
21e2842
Call gzip explicitly
aherrmann Apr 7, 2022
c1a0470
fix typo
aherrmann Apr 14, 2022
5caaa4d
Fix da-ghci issue
aherrmann Apr 14, 2022
a1cfc27
Ignore differing line endings on Windows
aherrmann Apr 14, 2022
4184968
Update GHC revision for ghc-lib
aherrmann Apr 14, 2022
b52abc1
Update GHC revision for ghc-lib
aherrmann Apr 21, 2022
18ad7a9
Fix typo in lib.sh
aherrmann Apr 21, 2022
728d2b5
Expose Hadrian dependencies from @stackage
aherrmann Apr 21, 2022
df4a3a3
Build Hadrian as a haskell_cabal_binary
aherrmann Apr 21, 2022
2de83e3
Expose Bazel built Hadrian to ghc-lib-gen
aherrmann Apr 21, 2022
38cf955
Use the Bazel provided Hadrian in ghc-lib-gen
aherrmann Apr 21, 2022
31f7839
Expose `ranlib` to ghc-lib-gen on MacOS
aherrmann Apr 21, 2022
ca4a6b8
Fix locale issues on MacOS
aherrmann Apr 21, 2022
c882420
Set CC and LD explicitly
aherrmann Apr 21, 2022
5ebbe5d
Expose bintools and xcodebuild on Darwin
aherrmann Apr 21, 2022
2a10dfd
Remove stack binary from ghc-lib inputs
aherrmann Apr 28, 2022
6cb17cd
Factor out ghc-lib dependencies
aherrmann Apr 28, 2022
79fd474
Document the binary and library bundle rules
aherrmann Apr 28, 2022
55749ae
Document the ghc-lib macros
aherrmann Apr 28, 2022
87ec2af
drop unused GHC_SHA256
aherrmann Apr 28, 2022
8ea0fb5
Document updating and patching ghc-lib
aherrmann Apr 28, 2022
47c8ce3
Document ghc-lib update procedures
aherrmann Apr 28, 2022
a40aa91
Add forgotten nix/repositories.bzl
aherrmann Apr 28, 2022
0128e0b
Add `sh_inline_binary` macro
cbley-da Apr 29, 2022
2d53fe4
Add `cabal-update` runnable target for `ghc-lib{,-parser}`
cbley-da Apr 29, 2022
5c6937d
Add copyright header to `nix/repositories.bzl`
cbley-da Apr 29, 2022
6811178
Fix template parameter for `sh_inline_{test,binary}`
cbley-da Apr 29, 2022
b36ccd9
Use separate rules for `sh_inline_test` and `sh_inline_binary`
cbley-da May 2, 2022
3842ba7
Fix indentation of `build_file_content`
cbley-da May 2, 2022
980304e
Remove old ghc-lib import
cbley-da May 3, 2022
ee9a61f
Document how to develop with a local GHC checkout
cbley-da May 4, 2022
05d4abd
Update the workflow on how to get changes of GHC into daml
cbley-da May 4, 2022
94f1bbc
Revert "DEBUG"
cbley-da May 5, 2022
e4c1281
Drop patches for da-ghc and adapt docs
cbley-da May 13, 2022
aecfb48
Update `GHC_REV` to current da-master-8.8.1
cbley-da May 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update the workflow on how to get changes of GHC into daml
  • Loading branch information
cbley-da committed May 17, 2022
commit 05d4abd3b21e5d3db2d98816a9b71e533bd94340
27 changes: 1 addition & 26 deletions ghc-lib/new-working-on-ghc-lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,29 +92,4 @@ While working on GHC, you can integrate your changes directly into the `daml` pr
bazel build --override_repository=da-ghc="$( cd ../ghc ; pwd )" //...
```

### Building `daml` following a change to `ghc`

Once you have the GHC patch you want to incorporate into the Daml repo, here's the steps you'll need to take:

1. Open a PR in the daml repo with the commit hash for the GHC patch in `ci/da-ghc-lib/compile.yml`. See [here](https://github.com/digital-asset/daml/pull/7489/commits/fedc456260f598f9924ce62d9765c3c09b8ad861)

2. Wait for CI to build `ghc-lib`/`ghc-lib-parser`, and get the new SHA from the end of the azure CI logs. The CI/azure log you are looking for is in the `Bash` subtab of the `da_ghc_lib` job. The lines of interest are at the very end of the log, and will look like this:

```
GHC_LIB_REV = "60a14c87f2fa4b204eed881425e86a50"
GHC_LIB_SHA256 = "c0e359e43b7d2209208eb8dbd22c2071b462c954b1f413d1ac784bcd4be056bf"
GHC_LIB_VERSION = "8.8.1"
GHC_LIB_PARSER_REV = "60a14c87f2fa4b204eed881425e86a50"
GHC_LIB_PARSER_SHA256 = "5765c67c24cb1a140918ae51c8d45a61fe5268ccace303b7275997970b660273"
GHC_LIB_PARSER_VERSION = "8.8.1"
```

3. Update `bazel-haskell-deps.bzl` with the new values, they go at the top of the file after the `load(...)` statements. Push this to the daml repo PR.

4. Once CI has finished successfully, you can merge the GHC patch PR.

5. Update the GHC patch commit hash in `ci/da-ghc-lib/compile.yml` to point to the new HEAD of the GHC fork.

6. Repeat steps 2 and 3.

7. Once CI has finished successfully, you can merge the daml PR.
After you are satisfied with your changes, just open a PR on the GHC repository and after it is merged update the SHA value in `GHC_REV` in [`/bazel_tools/ghc-lib/version.bzl`] and create a PR for the `daml` project.