mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
da8064de64
* Implement AnyView as a stable package / primitive * Point to updated GHC * Export AnyView datatype, move typeclasses, fix convertPrim * Adjust AnyView w/ InterfaceTypeRep, implement {to,from}AnyView * fix lint, satisfy changelog CHANGELOG_BEGIN CHANGELOG_END * fix daml-desugar * Has{From,To}AnyView instances in daml-docs * Add DA.Internal.Interface.AnyView to LibraryModules for stdlib * Fix hash for DA.Internal.Interface.AnyView * Prefix AnyView with CurrentSdk, add to golden for daml-script test * Remove HasToAnyView * Split AnyView into AnyView and AnyView.Types * fix hash * Remove unused StandaloneDeriving * Add HasField instances (requires relevant workers) * Accept desugaring test changes for removal of HasToAnyView * Update daml-doc for removal/modification of HasToAnyView/HasFromAnyView * Update StablePackage hash for DA.Internal.Interface.AnyView.Types |
||
---|---|---|
.. | ||
ghc-lib | ||
ghc-lib-parser | ||
BUILD.bazel | ||
BUILD.ghc | ||
BUILD.ghc-lib-gen | ||
BUILD.nix-deps | ||
defs.bzl | ||
ghc-lib-no-stack.patch | ||
lib.sh | ||
README.md | ||
repositories.bzl | ||
version.bzl |
GHC-LIB
This setup builds ghc-lib
and ghc-lib-parser
entirely within Bazel,
including the generation of the Cabal sdists performed by ghc-lib-gen
.
The generated sdists are built by Bazel using haskell_cabal_library
rules and
then included in the stack_snapshot
rule for @stackage
as
vendored_packages
.
Note, stack_snapshot
's vendoring mechanism requries the Cabal files to be
sources files, i.e. it cannot reference generated Cabal files. Therefore, the
Cabal files are checked in and need to be updated when ghc-lib(-parser)
changes.
Build
- To build the sdists of ghc-lib(-parser) use the following commands:
$ bazel build @da-ghc//:ghc-lib-parser $ bazel build @da-ghc//:ghc-lib
- To build the Cabal libraries ghc-lib(-parser) use the following commands:
or alternatively you can use the aliases exposed by$ bazel build //bazel_tools/ghc-lib/ghc-lib-parser $ bazel build //bazel_tools/ghc-lib/ghc-lib
stack_snapshot
'svendored_packages
.$ bazel build @stackage//:ghc-lib-parser $ bazel build @stackage//:ghc-lib
- To depend on ghc-lib(-parser) use the targets exposed by
stack_snapshot
:@stackage//:ghc-lib-parser @stackage//:ghc-lib
Update
Note, an update of any of these may affect ghc-lib(-parser)'s Cabal files. If so, see below for updating the checked in Cabal files.
- To update the GHC revision used to build ghc-lib change the
GHC_REV
variable withinbazel_tools/ghc-lib/version.bzl
. If needed update the patches listed withinGHC_PATCHES
, see below. - To update the GHC version used to build ghc-lib also update the
GHC_FLAVOR
andGHC_LIB_VERSION
variables withinbazel_tools/ghc-lib/version.bzl
. - To update the ghc-lib revision, which provides the
ghc-lib-gen
tool, change theGHC_LIB_REV
andGHC_LIB_SHA256
variables withinbazel_tools/ghc-lib/version.bzl
and update the patches inGHC_LIB_PATCHES
if needed. - To update the checked in Cabal files execute the following Bazel commands.
$ bazel run //bazel_tools/ghc-lib/ghc-lib-parser:cabal-update $ bazel run //bazel_tools/ghc-lib/ghc-lib:cabal-update
Patches
ghc-lib-no-stack.patch
patchghc-lib-gen
to use a prebuilt Hadrian binary. With this changeghc-lib-gen
no longer requiresstack
.