summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
Diffstat (limited to 'hadrian')
-rwxr-xr-xhadrian/bootstrap/bootstrap.py6
-rw-r--r--hadrian/bootstrap/plan-bootstrap-9_2_1.json22
-rw-r--r--hadrian/bootstrap/plan-bootstrap-9_2_2.json22
-rw-r--r--hadrian/bootstrap/plan-bootstrap-9_2_3.json22
-rw-r--r--hadrian/bootstrap/plan-bootstrap-9_2_4.json22
-rw-r--r--hadrian/bootstrap/plan-bootstrap-9_2_5.json22
-rw-r--r--hadrian/bootstrap/plan-bootstrap-9_4_1.json26
-rw-r--r--hadrian/bootstrap/plan-bootstrap-9_4_2.json26
-rw-r--r--hadrian/bootstrap/plan-bootstrap-9_4_3.json26
-rw-r--r--hadrian/cabal.project2
-rw-r--r--hadrian/hadrian.cabal2
-rw-r--r--hadrian/stack.yaml2
12 files changed, 153 insertions, 47 deletions
diff --git a/hadrian/bootstrap/bootstrap.py b/hadrian/bootstrap/bootstrap.py
index b997cbc916..4fd6e147a5 100755
--- a/hadrian/bootstrap/bootstrap.py
+++ b/hadrian/bootstrap/bootstrap.py
@@ -78,6 +78,8 @@ FetchInfo = NamedTuple('FetchInfo', [
FetchPlan = Dict[Path, FetchInfo]
+local_packages: List[PackageName] = ["hadrian", "Cabal-syntax", "Cabal"]
+
class Compiler:
def __init__(self, ghc_path: Path):
if not ghc_path.is_file():
@@ -173,7 +175,7 @@ def resolve_dep(dep : BootstrapDep) -> Path:
shutil.copyfile(cabal_file, sdist_dir / f'{dep.package}.cabal')
elif dep.source == PackageSource.LOCAL:
- if dep.package == 'hadrian':
+ if dep.package in local_packages:
sdist_dir = Path(sys.path[0]).parent.resolve()
else:
raise ValueError(f'Unknown local package {dep.package}')
@@ -341,7 +343,7 @@ def fetch_from_plan(plan : FetchPlan, output_dir : Path):
def gen_fetch_plan(info : BootstrapInfo) -> FetchPlan :
sources_dict = {}
for dep in info.dependencies:
- if dep.package != 'hadrian':
+ if not(dep.package in local_packages):
sources_dict[f"{dep.package}-{dep.version}.tar.gz"] = FetchInfo(package_url(dep.package, dep.version), dep.src_sha256)
if dep.revision is not None:
sources_dict[f"{dep.package}.cabal"] = FetchInfo(package_cabal_url(dep.package, dep.version, dep.revision), dep.cabal_sha256)
diff --git a/hadrian/bootstrap/plan-bootstrap-9_2_1.json b/hadrian/bootstrap/plan-bootstrap-9_2_1.json
index 7d7d496249..5a40d0e41b 100644
--- a/hadrian/bootstrap/plan-bootstrap-9_2_1.json
+++ b/hadrian/bootstrap/plan-bootstrap-9_2_1.json
@@ -83,10 +83,6 @@
{
"package": "process",
"version": "1.6.13.2"
- },
- {
- "package": "Cabal",
- "version": "3.6.0.0"
}
],
"dependencies": [
@@ -244,6 +240,24 @@
},
{
"cabal_sha256": null,
+ "flags": [],
+ "package": "Cabal",
+ "revision": null,
+ "source": "local",
+ "src_sha256": null,
+ "version": "3.9.0.0"
+ },
+ {
+ "cabal_sha256": null,
+ "flags": [],
+ "package": "Cabal-syntax",
+ "revision": null,
+ "source": "local",
+ "src_sha256": null,
+ "version": "3.9.0.0"
+ },
+ {
+ "cabal_sha256": null,
"flags": [
"+selftest",
"+threaded"
diff --git a/hadrian/bootstrap/plan-bootstrap-9_2_2.json b/hadrian/bootstrap/plan-bootstrap-9_2_2.json
index 23a5757faf..00fa1b854d 100644
--- a/hadrian/bootstrap/plan-bootstrap-9_2_2.json
+++ b/hadrian/bootstrap/plan-bootstrap-9_2_2.json
@@ -83,10 +83,6 @@
{
"package": "process",
"version": "1.6.13.2"
- },
- {
- "package": "Cabal",
- "version": "3.6.3.0"
}
],
"dependencies": [
@@ -244,6 +240,24 @@
},
{
"cabal_sha256": null,
+ "flags": [],
+ "package": "Cabal",
+ "revision": null,
+ "source": "local",
+ "src_sha256": null,
+ "version": "3.9.0.0"
+ },
+ {
+ "cabal_sha256": null,
+ "flags": [],
+ "package": "Cabal-syntax",
+ "revision": null,
+ "source": "local",
+ "src_sha256": null,
+ "version": "3.9.0.0"
+ },
+ {
+ "cabal_sha256": null,
"flags": [
"+selftest",
"+threaded"
diff --git a/hadrian/bootstrap/plan-bootstrap-9_2_3.json b/hadrian/bootstrap/plan-bootstrap-9_2_3.json
index cdc55fdc5c..77c7eae062 100644
--- a/hadrian/bootstrap/plan-bootstrap-9_2_3.json
+++ b/hadrian/bootstrap/plan-bootstrap-9_2_3.json
@@ -83,10 +83,6 @@
{
"package": "process",
"version": "1.6.13.2"
- },
- {
- "package": "Cabal",
- "version": "3.6.3.0"
}
],
"dependencies": [
@@ -244,6 +240,24 @@
},
{
"cabal_sha256": null,
+ "flags": [],
+ "package": "Cabal",
+ "revision": null,
+ "source": "local",
+ "src_sha256": null,
+ "version": "3.9.0.0"
+ },
+ {
+ "cabal_sha256": null,
+ "flags": [],
+ "package": "Cabal-syntax",
+ "revision": null,
+ "source": "local",
+ "src_sha256": null,
+ "version": "3.9.0.0"
+ },
+ {
+ "cabal_sha256": null,
"flags": [
"+selftest",
"+threaded"
diff --git a/hadrian/bootstrap/plan-bootstrap-9_2_4.json b/hadrian/bootstrap/plan-bootstrap-9_2_4.json
index e5916c0685..4af325b441 100644
--- a/hadrian/bootstrap/plan-bootstrap-9_2_4.json
+++ b/hadrian/bootstrap/plan-bootstrap-9_2_4.json
@@ -83,10 +83,6 @@
{
"package": "process",
"version": "1.6.13.2"
- },
- {
- "package": "Cabal",
- "version": "3.6.3.0"
}
],
"dependencies": [
@@ -244,6 +240,24 @@
},
{
"cabal_sha256": null,
+ "flags": [],
+ "package": "Cabal",
+ "revision": null,
+ "source": "local",
+ "src_sha256": null,
+ "version": "3.9.0.0"
+ },
+ {
+ "cabal_sha256": null,
+ "flags": [],
+ "package": "Cabal-syntax",
+ "revision": null,
+ "source": "local",
+ "src_sha256": null,
+ "version": "3.9.0.0"
+ },
+ {
+ "cabal_sha256": null,
"flags": [
"+selftest",
"+threaded"
diff --git a/hadrian/bootstrap/plan-bootstrap-9_2_5.json b/hadrian/bootstrap/plan-bootstrap-9_2_5.json
index d1901ebb57..685ef61fa7 100644
--- a/hadrian/bootstrap/plan-bootstrap-9_2_5.json
+++ b/hadrian/bootstrap/plan-bootstrap-9_2_5.json
@@ -83,10 +83,6 @@
{
"package": "process",
"version": "1.6.16.0"
- },
- {
- "package": "Cabal",
- "version": "3.6.3.0"
}
],
"dependencies": [
@@ -244,6 +240,24 @@
},
{
"cabal_sha256": null,
+ "flags": [],
+ "package": "Cabal",
+ "revision": null,
+ "source": "local",
+ "src_sha256": null,
+ "version": "3.9.0.0"
+ },
+ {
+ "cabal_sha256": null,
+ "flags": [],
+ "package": "Cabal-syntax",
+ "revision": null,
+ "source": "local",
+ "src_sha256": null,
+ "version": "3.9.0.0"
+ },
+ {
+ "cabal_sha256": null,
"flags": [
"+selftest",
"+threaded"
diff --git a/hadrian/bootstrap/plan-bootstrap-9_4_1.json b/hadrian/bootstrap/plan-bootstrap-9_4_1.json
index 4d42eaf876..8c3adf907e 100644
--- a/hadrian/bootstrap/plan-bootstrap-9_4_1.json
+++ b/hadrian/bootstrap/plan-bootstrap-9_4_1.json
@@ -81,16 +81,8 @@
"version": "3.1.15.0"
},
{
- "package": "Cabal-syntax",
- "version": "3.8.1.0"
- },
- {
"package": "process",
"version": "1.6.15.0"
- },
- {
- "package": "Cabal",
- "version": "3.8.1.0"
}
],
"dependencies": [
@@ -248,6 +240,24 @@
},
{
"cabal_sha256": null,
+ "flags": [],
+ "package": "Cabal",
+ "revision": null,
+ "source": "local",
+ "src_sha256": null,
+ "version": "3.9.0.0"
+ },
+ {
+ "cabal_sha256": null,
+ "flags": [],
+ "package": "Cabal-syntax",
+ "revision": null,
+ "source": "local",
+ "src_sha256": null,
+ "version": "3.9.0.0"
+ },
+ {
+ "cabal_sha256": null,
"flags": [
"+selftest",
"+threaded"
diff --git a/hadrian/bootstrap/plan-bootstrap-9_4_2.json b/hadrian/bootstrap/plan-bootstrap-9_4_2.json
index 412cda97d2..fa3d512867 100644
--- a/hadrian/bootstrap/plan-bootstrap-9_4_2.json
+++ b/hadrian/bootstrap/plan-bootstrap-9_4_2.json
@@ -81,16 +81,8 @@
"version": "3.1.15.0"
},
{
- "package": "Cabal-syntax",
- "version": "3.8.1.0"
- },
- {
"package": "process",
"version": "1.6.15.0"
- },
- {
- "package": "Cabal",
- "version": "3.8.1.0"
}
],
"dependencies": [
@@ -248,6 +240,24 @@
},
{
"cabal_sha256": null,
+ "flags": [],
+ "package": "Cabal",
+ "revision": null,
+ "source": "local",
+ "src_sha256": null,
+ "version": "3.9.0.0"
+ },
+ {
+ "cabal_sha256": null,
+ "flags": [],
+ "package": "Cabal-syntax",
+ "revision": null,
+ "source": "local",
+ "src_sha256": null,
+ "version": "3.9.0.0"
+ },
+ {
+ "cabal_sha256": null,
"flags": [
"+selftest",
"+threaded"
diff --git a/hadrian/bootstrap/plan-bootstrap-9_4_3.json b/hadrian/bootstrap/plan-bootstrap-9_4_3.json
index c435814d9b..56898b0339 100644
--- a/hadrian/bootstrap/plan-bootstrap-9_4_3.json
+++ b/hadrian/bootstrap/plan-bootstrap-9_4_3.json
@@ -81,16 +81,8 @@
"version": "3.1.15.0"
},
{
- "package": "Cabal-syntax",
- "version": "3.8.1.0"
- },
- {
"package": "process",
"version": "1.6.16.0"
- },
- {
- "package": "Cabal",
- "version": "3.8.1.0"
}
],
"dependencies": [
@@ -248,6 +240,24 @@
},
{
"cabal_sha256": null,
+ "flags": [],
+ "package": "Cabal",
+ "revision": null,
+ "source": "local",
+ "src_sha256": null,
+ "version": "3.9.0.0"
+ },
+ {
+ "cabal_sha256": null,
+ "flags": [],
+ "package": "Cabal-syntax",
+ "revision": null,
+ "source": "local",
+ "src_sha256": null,
+ "version": "3.9.0.0"
+ },
+ {
+ "cabal_sha256": null,
"flags": [
"+selftest",
"+threaded"
diff --git a/hadrian/cabal.project b/hadrian/cabal.project
index 769b1f0558..b8991ad09e 100644
--- a/hadrian/cabal.project
+++ b/hadrian/cabal.project
@@ -1,4 +1,6 @@
packages: ./
+-- N.B. This could be removed once Cabal 3.9 is released.
+packages: ../libraries/Cabal/Cabal, ../libraries/Cabal/Cabal-syntax
-- This essentially freezes the build plan for hadrian
index-state: 2022-11-19T22:13:06Z
diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal
index b0c4533b36..b3dce99dcc 100644
--- a/hadrian/hadrian.cabal
+++ b/hadrian/hadrian.cabal
@@ -149,7 +149,7 @@ executable hadrian
, TypeOperators
other-extensions: MultiParamTypeClasses
, TypeFamilies
- build-depends: Cabal >= 3.2 && < 3.9
+ build-depends: Cabal >= 3.9 && < 3.10
, base >= 4.11 && < 5
, bytestring >= 0.10 && < 0.12
, containers >= 0.5 && < 0.7
diff --git a/hadrian/stack.yaml b/hadrian/stack.yaml
index 9114485dd8..44a65c46c6 100644
--- a/hadrian/stack.yaml
+++ b/hadrian/stack.yaml
@@ -2,6 +2,8 @@ resolver: lts-19.8
packages:
- '.'
+- '../libraries/Cabal/Cabal'
+- '../libraries/Cabal/Cabal-syntax'
nix:
enable: false