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
Show file tree
Hide file tree
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
Add the new ghc-lib-parser to stack_snapshot
changelog_begin
changelog_end
  • Loading branch information
aherrmann authored and cbley-da committed May 17, 2022
commit 70ecbfd58d8e5310210a2c59bb3050e3c9ff3a0e
4 changes: 1 addition & 3 deletions bazel-haskell-deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ exports_files(["stack.exe"], visibility = ["//visibility:public"])
"alex",
"ansi-terminal",
"ansi-wl-pprint",
"array",
"async",
"base",
"base16-bytestring",
Expand Down Expand Up @@ -550,7 +549,6 @@ exports_files(["stack.exe"], visibility = ["//visibility:public"])
"filepath",
"filepattern",
"ghc-lib-parser-ex",
"ghc-prim",
"gitrev",
"happy",
"hashable",
Expand Down Expand Up @@ -657,7 +655,7 @@ exports_files(["stack.exe"], visibility = ["//visibility:public"])
vendored_packages = {
"ghcide": "@ghcide_ghc_lib//:ghcide",
"ghc-lib": "@ghc_lib//:ghc-lib",
"ghc-lib-parser": "@ghc_lib_parser//:ghc-lib-parser",
"ghc-lib-parser": "@com_github_digital_asset_daml//bazel_tools/ghc-lib/ghc-lib-parser",
"grpc-haskell-core": "@grpc_haskell_core//:grpc-haskell-core",
"grpc-haskell": "@grpc_haskell//:grpc-haskell",
"js-dgtable": "@js_dgtable//:js-dgtable",
Expand Down
335 changes: 335 additions & 0 deletions bazel_tools/ghc-lib/ghc-lib-parser/ghc-lib-parser.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,335 @@
cabal-version: >=1.22
build-type: Simple
name: ghc-lib-parser
version: 8.8.1
license: BSD3
license-file: LICENSE
category: Development
author: The GHC Team and Digital Asset
maintainer: Digital Asset
synopsis: The GHC API, decoupled from GHC versions
description: A package equivalent to the @ghc@ package, but which can be loaded on many compiler versions.
homepage: https://github.com/digital-asset/ghc-lib
bug-reports: https://github.com/digital-asset/ghc-lib/issues
data-dir: ghc-lib/stage0/lib
data-files:
settings
llvm-targets
llvm-passes
platformConstants
extra-source-files:
ghc-lib/generated/ghcautoconf.h
ghc-lib/generated/ghcplatform.h
ghc-lib/generated/GhclibDerivedConstants.h
ghc-lib/generated/GHCConstantsHaskellExports.hs
ghc-lib/generated/GHCConstantsHaskellWrappers.hs
ghc-lib/generated/GHCConstantsHaskellType.hs
ghc-lib/stage0/compiler/build/primop-can-fail.hs-incl
ghc-lib/stage0/compiler/build/primop-code-size.hs-incl
ghc-lib/stage0/compiler/build/primop-commutable.hs-incl
ghc-lib/stage0/compiler/build/primop-data-decl.hs-incl
ghc-lib/stage0/compiler/build/primop-fixity.hs-incl
ghc-lib/stage0/compiler/build/primop-has-side-effects.hs-incl
ghc-lib/stage0/compiler/build/primop-list.hs-incl
ghc-lib/stage0/compiler/build/primop-out-of-line.hs-incl
ghc-lib/stage0/compiler/build/primop-primop-info.hs-incl
ghc-lib/stage0/compiler/build/primop-strictness.hs-incl
ghc-lib/stage0/compiler/build/primop-tag.hs-incl
ghc-lib/stage0/compiler/build/primop-vector-tycons.hs-incl
ghc-lib/stage0/compiler/build/primop-vector-tys-exports.hs-incl
ghc-lib/stage0/compiler/build/primop-vector-tys.hs-incl
ghc-lib/stage0/compiler/build/primop-vector-uniques.hs-incl
ghc-lib/stage0/compiler/build/ghc_boot_platform.h
ghc-lib/stage0/compiler/build/Fingerprint.hs
ghc-lib/stage0/compiler/build/Config.hs
ghc-lib/stage0/compiler/build/Parser.hs
ghc-lib/stage0/compiler/build/Lexer.hs
includes/MachDeps.h
includes/stg/MachRegs.h
includes/CodeGen.Platform.hs
compiler/Unique.h
compiler/GhclibHsVersions.h
compiler/nativeGen/NCG.h
compiler/utils/md5.h
source-repository head
type: git
location: git@github.com:digital-asset/ghc-lib.git

library
default-language: Haskell2010
exposed: False
include-dirs:
includes
ghc-lib/generated
ghc-lib/stage0/compiler/build
compiler
compiler/utils
ghc-options: -fobject-code -package=ghc-boot-th -optc-DTHREADED_RTS
cc-options: -DTHREADED_RTS
cpp-options: -DSTAGE=2 -DTHREADED_RTS -DGHCI -DGHC_IN_GHCI
if !os(windows)
build-depends: unix
else
build-depends: Win32
build-depends:
base >= 4.11 && < 4.15,
ghc-prim > 0.2 && < 0.8,
bytestring >= 0.9 && < 0.11,
time >= 1.4 && < 1.10,
containers >= 0.5 && < 0.7,
binary == 0.8.*,
filepath >= 1 && < 1.5,
directory >= 1 && < 1.4,
array >= 0.1 && < 0.6,
deepseq >= 1.4 && < 1.5,
pretty == 1.1.*,
transformers == 0.5.*,
process >= 1 && < 1.7
build-tools: alex >= 3.1, happy >= 1.19.4
other-extensions:
BangPatterns
CPP
DataKinds
DefaultSignatures
DeriveDataTypeable
DeriveFoldable
DeriveFunctor
DeriveGeneric
DeriveTraversable
DisambiguateRecordFields
ExistentialQuantification
ExplicitForAll
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
InstanceSigs
MagicHash
MultiParamTypeClasses
NamedFieldPuns
NondecreasingIndentation
RankNTypes
RecordWildCards
RoleAnnotations
ScopedTypeVariables
StandaloneDeriving
Trustworthy
TupleSections
TypeFamilies
TypeSynonymInstances
UnboxedTuples
UndecidableInstances
default-extensions:
NoImplicitPrelude
c-sources:
libraries/ghc-heap/cbits/HeapPrim.cmm
compiler/cbits/genSym.c
compiler/parser/cutils.c
hs-source-dirs:
ghc-lib/stage0/compiler/build
libraries/template-haskell
libraries/ghc-boot-th
compiler/basicTypes
compiler/specialise
compiler/profiling
compiler/simplCore
compiler/typecheck
libraries/ghc-boot
libraries/ghc-heap
compiler/backpack
compiler/simplStg
compiler/coreSyn
compiler/deSugar
compiler/prelude
compiler/parser
compiler/hsSyn
compiler/iface
compiler/types
compiler/utils
libraries/ghci
compiler/ghci
compiler/main
compiler/cmm
compiler
autogen-modules:
Lexer
Parser
exposed-modules:
Annotations
ApiAnnotation
Avail
Bag
BasicTypes
BinFingerprint
Binary
BkpSyn
BooleanFormula
BufWrite
ByteCodeTypes
Class
CmdLineParser
CmmType
CoAxiom
Coercion
ConLike
Config
Constants
CoreArity
CoreFVs
CoreMap
CoreMonad
CoreOpt
CoreSeq
CoreStats
CoreSubst
CoreSyn
CoreTidy
CoreUnfold
CoreUtils
CostCentre
CostCentreState
Ctype
DataCon
Demand
Digraph
DriverPhases
DynFlags
Encoding
EnumSet
ErrUtils
Exception
FV
FamInstEnv
FastFunctions
FastMutInt
FastString
FastStringEnv
FieldLabel
FileCleanup
Fingerprint
FiniteMap
ForeignCall
GHC.Exts.Heap
GHC.Exts.Heap.ClosureTypes
GHC.Exts.Heap.Closures
GHC.Exts.Heap.Constants
GHC.Exts.Heap.InfoTable
GHC.Exts.Heap.InfoTable.Types
GHC.Exts.Heap.InfoTableProf
GHC.Exts.Heap.Utils
GHC.ForeignSrcLang
GHC.ForeignSrcLang.Type
GHC.LanguageExtensions
GHC.LanguageExtensions.Type
GHC.Lexeme
GHC.PackageDb
GHC.Serialized
GHCi.BreakArray
GHCi.FFI
GHCi.Message
GHCi.RemoteTypes
GHCi.TH.Binary
GhcMonad
GhcPrelude
HaddockUtils
HeaderInfo
Hooks
HsBinds
HsDecls
HsDoc
HsDumpAst
HsExpr
HsExtension
HsImpExp
HsInstances
HsLit
HsPat
HsSyn
HsTypes
HsUtils
HscTypes
IOEnv
Id
IdInfo
IfaceSyn
IfaceType
InstEnv
InteractiveEvalTypes
Json
Kind
KnownUniques
Language.Haskell.TH
Language.Haskell.TH.LanguageExtensions
Language.Haskell.TH.Lib
Language.Haskell.TH.Lib.Internal
Language.Haskell.TH.Lib.Map
Language.Haskell.TH.Ppr
Language.Haskell.TH.PprLib
Language.Haskell.TH.Syntax
Lexeme
Lexer
ListSetOps
Literal
Maybes
MkCore
MkId
Module
MonadUtils
Name
NameCache
NameEnv
NameSet
OccName
OccurAnal
OptCoercion
OrdList
Outputable
PackageConfig
Packages
Pair
Panic
Parser
PatSyn
PipelineMonad
PlaceHolder
PlainPanic
Platform
PlatformConstants
Plugins
PmExpr
PprColour
PprCore
PrelNames
PrelRules
Pretty
PrimOp
RdrHsSyn
RdrName
RepType
Rules
SizedSeq
SrcLoc
StringBuffer
SysTools.BaseDir
SysTools.Terminal
TcEvidence
TcRnTypes
TcType
ToIface
TrieMap
TyCoRep
TyCon
Type
TysPrim
TysWiredIn
Unify
UniqDFM
UniqDSet
UniqFM
UniqSet
UniqSupply
Unique
Util
Var
VarEnv
VarSet