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

Bazelify ghc-lib #12508

merged 65 commits into from
May 19, 2022

Conversation

aherrmann-da
Copy link
Contributor

@aherrmann-da aherrmann-da commented Jan 20, 2022

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags
  • Normal production system change, include purpose of change in description
  • If you mean to change the status of a component, please make sure you keep the Component Status page up to date.

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

TODO

  • Remove stack from the ghc-lib(-parser) sdist generation rule inputs, on both Windows and Unix.
  • Factor out ghc-lib external dependencies from WORKSPACE into bazel_tools/ghc-lib/repositories.bzl.
  • Document the new rules in bundle.bzl and dev_env_tool.bzl.
  • Document the definitions in bazel_tools/ghc-lib/defs.bzl|repositories.bzl. In particular, document the indirection w.r.t. BUILD.ghc(-lib) to avoid refetch on changes.
  • Document in bazel_tools/ghc-lib/README.md the update and patching procedures. I.e. how to update the GHC revision, how to update the ghc-lib revision, how to update any of the needed patches.
  • Document how to build the various components. I.e. document how to build ghc-lib(-parser) sdists, and how to build the ghc-lib(-parser) Cabal libraries.
  • Add cabal-update runnable targets to bazel_tools/ghc-lib/ghc-lib(-parser) to update the respective Cabal files after the GHC revision changed.
  • Document an interactive development workflow based on a GHC checkout and Bazel's --override_repository flag.
  • Remove the old ghc-lib import
  • Change GHC_REV once Add changes required by DAML ghc#119 is merged

Follow Up

  • Remove the old ghc-lib CI pipeline in ci/da-ghc-lib/compile.yml.
  • Upstream bundle.bzl and dev_env_tool.bzl to rules_sh.

@aherrmann-da aherrmann-da force-pushed the ghc-lib-gen branch 2 times, most recently from 2f711b2 to 9373f47 Compare January 20, 2022 16:56
@aherrmann-da aherrmann-da force-pushed the ghc-lib-gen branch 2 times, most recently from 8a10cbf to 2180050 Compare February 10, 2022 16:00
@aherrmann-da aherrmann-da force-pushed the ghc-lib-gen branch 4 times, most recently from 95c8353 to 3f7797f Compare March 24, 2022 15:54
@aherrmann-da aherrmann-da force-pushed the ghc-lib-gen branch 4 times, most recently from 7ab677b to 630a5fd Compare April 7, 2022 16:21
@aherrmann-da aherrmann-da force-pushed the ghc-lib-gen branch 2 times, most recently from 0fc996c to 9401904 Compare April 21, 2022 08:36
@aherrmann-da aherrmann-da force-pushed the ghc-lib-gen branch 2 times, most recently from 96f988b to a12168d Compare April 28, 2022 07:09
@cbley-da cbley-da force-pushed the ghc-lib-gen branch 2 times, most recently from dac6c33 to 2ae4a7d Compare May 2, 2022 08:34
bazel_tools/sh/sh.bzl Outdated Show resolved Hide resolved
build.ps1 Outdated Show resolved Hide resolved
@cbley-da cbley-da marked this pull request as ready for review May 5, 2022 10:13
Copy link
Contributor

@garyverhaegen-da garyverhaegen-da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but I'd prefer if someone from Language approved.

@garyverhaegen-da garyverhaegen-da requested a review from a team May 5, 2022 10:46
@cbley-da cbley-da marked this pull request as draft May 13, 2022 07:37
@cbley-da cbley-da marked this pull request as ready for review May 17, 2022 12:17
@cbley-da
Copy link
Contributor

I have removed the patches to da-ghc as requested, rebased onto main, and the CI is green again. PTAL

Also see digital-asset/ghc#119 which should be merged first.

Copy link
Contributor

@sofiafaro-da sofiafaro-da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thank you Claudio!

@cbley-da cbley-da enabled auto-merge (squash) May 19, 2022 07:19
@cbley-da cbley-da disabled auto-merge May 19, 2022 07:43
@cbley-da cbley-da merged commit 18a9c93 into main May 19, 2022
@cbley-da cbley-da deleted the ghc-lib-gen branch May 19, 2022 08:49
cbley-da added a commit that referenced this pull request May 23, 2022
Since #12508, ghc-lib is build within Bazel and this job can be removed.

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

Successfully merging this pull request may close these issues.

5 participants