Skip to content

Commit 42877f7

Browse files
committed
[query] fully define mill compile dependencies
1 parent e6acdb2 commit 42877f7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1392
-1860
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ pylint-hailtop:
5757
$(PYTHON) -m pylint --rcfile pylintrc hail/python/hailtop --score=n
5858

5959
.PHONY: check-hail
60+
check-hail: export HAIL_BUILD_MODE=Dev
61+
check-hail: HAIL_DEPLOY_TARGET='spark_2.13:3.5.3'
6062
check-hail: check-hail-fast pylint-hailtop
61-
cd hail && HAIL_BUILD_MODE=Dev SCALA_VERSION=2.13 $(MILL) $(MILLOPTS) hail[].__.checkFormat + hail[].__.fix --check
63+
cd hail && $(MILL) $(MILLOPTS) hail[].__.checkFormat + hail[].__.fix --check
6264

6365
.PHONY: check-batch
6466
check-batch: check-batch-fast pylint-batch

build.yaml

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -773,23 +773,18 @@ steps:
773773
set -ex
774774
cd /io/repo/hail
775775
776-
export MILLOPTS='--no-daemon' HAIL_BUILD_MODE=Release
777-
time retry sh mill --no-daemon --version
778-
779776
# We've encountered the following sporadic error in CI between `mill`
780777
# finishing assembling the jar and `Make` copying the jar:
781778
#
782779
# cp -f out/assembly.dest/out.jar python/hail/backend/hail-all-spark.jar
783780
# cp: cannot stat 'out/assembly.dest/out.jar': No such file or directory
784781
#
785-
# This was likely from running mill in server mode; mill main exits before
782+
# This was caused by running mill in daemon mode; mill main exits before
786783
# the jar has finished being written.
787-
time retry make shadowJar
788-
if [ ! -f out/hail/2.12/assembly.dest/out.jar ]; then
789-
echo 'no out.jar found after mill assembly returned. going to sleep'
790-
sleep 5
791-
fi
784+
export MILLOPTS='--no-daemon'
792785
786+
export HAIL_DEPLOY_TARGET=dataproc-2.3.x HAIL_BUILD_MODE=Release
787+
time retry sh mill --no-daemon --version
793788
time retry make DEV_CLARIFIER=hail-ci-build wheel
794789
795790
# Check wheel size is small enough for pypi (< 200 MiB)
@@ -851,12 +846,12 @@ steps:
851846
set -ex
852847
cd /io/repo/hail
853848
854-
export MILLOPTS='--no-daemon' HAIL_BUILD_MODE=CI
849+
export HAIL_DEPLOY_TARGET=dataproc-2.3.x HAIL_BUILD_MODE=CI MILLOPTS='--no-daemon'
855850
time retry sh mill --no-daemon --version
856851
857852
# See `build_hail_jar_and_wheel`
858853
time retry make shadowJar
859-
if [ ! -f out/hail/2.12/assembly.dest/out.jar ]; then
854+
if [ ! -f "out/hail/${HAIL_DEPLOY_TARGET}/assembly.dest/out.jar" ]; then
860855
echo 'no out.jar found after mill assembly returned. going to sleep'
861856
sleep 5
862857
fi
@@ -884,12 +879,12 @@ steps:
884879
set -ex
885880
cd /io/repo/hail
886881
887-
export MILLOPTS='--no-daemon' HAIL_BUILD_MODE=CI
882+
export HAIL_DEPLOY_TARGET=dataproc-2.3.x MILLOPTS='--no-daemon' HAIL_BUILD_MODE=CI
888883
time retry sh mill --no-daemon --version
889884
890885
# See `build_hail_jar_and_wheel`
891886
time retry make shadowTestJar
892-
if [ ! -f out/hail/2.12/test/assembly.dest/out.jar ]; then
887+
if [ ! -f "out/hail/${HAIL_DEPLOY_TARGET}/test/assembly.dest/out.jar" ]; then
893888
echo 'no out.jar found after mill assembly returned. going to sleep'
894889
sleep 5
895890
fi
@@ -944,16 +939,11 @@ steps:
944939
set -ex
945940
cd /io/repo/hail
946941
947-
export SPARK_VERSION="3.0.2" SCALA_VERSION="2.12.13" HAIL_BUILD_MODE=Release MILLOPTS='--no-daemon'
942+
export SPARK_VERSION="3.3.1" SCALA_VERSION="2.12.13"
943+
944+
export MILLOPTS='--no-daemon'
945+
export HAIL_DEPLOY_TARGET=hdinsight-5.1 HAIL_BUILD_MODE=Release
948946
time retry sh mill --no-daemon --version
949-
950-
# See `build_hail_jar_and_wheel`
951-
time retry make shadowJar
952-
if [ ! -f out/hail/2.12/assembly.dest/out.jar ]; then
953-
echo 'no out.jar found after mill assembly returned. going to sleep'
954-
sleep 5
955-
fi
956-
957947
time retry make wheel
958948
inputs:
959949
- from: /repo
@@ -1081,7 +1071,7 @@ steps:
10811071
inputs:
10821072
- from: /resources.tar.gz
10831073
to: /io/resources.tar.gz
1084-
- from: /derived/debug/hail/out/hail/2.12/test/assembly.dest/out.jar
1074+
- from: /derived/debug/hail/out/hail/dataproc-2.3.x/test/assembly.dest/out.jar
10851075
to: /io/hail-test.jar
10861076
- from: /splits.tar.gz
10871077
to: /io/splits.tar.gz
@@ -1691,7 +1681,7 @@ steps:
16911681
- hail_linting_image
16921682
- merge_code
16931683
- kind: runImage
1694-
name: compile_hail_213
1684+
name: compile_hail_dataproc_3_0_x
16951685
image:
16961686
valueFrom: base_image.image
16971687
resources:
@@ -1701,8 +1691,8 @@ steps:
17011691
set -ex
17021692
cd /io/repo/hail
17031693
1704-
HAIL_BUILD_MODE='CI'
1705-
time retry sh mill --no-daemon hail[2.13].__.compile
1694+
export HAIL_BUILD_MODE='CI'
1695+
time retry sh mill --no-daemon 'hail[dataproc-3.0.x].__.compile'
17061696
inputs:
17071697
- from: /repo
17081698
to: /io/repo
@@ -2573,7 +2563,7 @@ steps:
25732563
valueFrom: default_ns.name
25742564
mountPath: /batch-gsa-key
25752565
inputs:
2576-
- from: /derived/release/hail/out/hail/2.12/assembly.dest/out.jar
2566+
- from: /derived/release/hail/out/hail/dataproc-2.3.x/assembly.dest/out.jar
25772567
to: /io/hail.jar
25782568
- from: /repo/hail/env/REVISION
25792569
to: /io/REVISION
@@ -3499,7 +3489,7 @@ steps:
34993489
# #14452 - must build wheel with release `hailtop/hailctl/deploy.yaml`
35003490
# use `-o` to prevent `mill` from rebuilding the "SHADOW_JAR"
35013491
make upload-artifacts HAIL_BUILD_MODE=Release DEPLOY_REMOTE=origin \
3502-
-o out/hail/2.12/assembly.dest/out.jar
3492+
-o shadowJar
35033493
35043494
echo Setting arguments and invoking release.sh.
35053495
@@ -3524,8 +3514,8 @@ steps:
35243514
inputs:
35253515
- from: /repo
35263516
to: /io/repo
3527-
- from: /derived/release/hail/out/hail/2.12/assembly.dest/out.jar
3528-
to: /io/repo/hail/out/hail/2.12/assembly.dest/out.jar
3517+
- from: /derived/release/hail/out/hail/dataproc-2.3.x/assembly.dest/out.jar
3518+
to: /io/repo/hail/out/hail/dataproc-2.3.x/assembly.dest/out.jar
35293519
- from: /azure-wheel
35303520
to: /io/azure-wheel
35313521
- from: /www.tar.gz
@@ -3769,7 +3759,7 @@ steps:
37693759
inputs:
37703760
- from: /resources.tar.gz
37713761
to: /io/resources.tar.gz
3772-
- from: /derived/debug/hail/out/hail/2.12/test/assembly.dest/out.jar
3762+
- from: /derived/debug/hail/out/hail/dataproc-2.3.x/test/assembly.dest/out.jar
37733763
to: /io/hail-test.jar
37743764
- from: /repo/hail/testng-fs.xml
37753765
to: /io/testng-fs.xml
@@ -3811,7 +3801,7 @@ steps:
38113801
inputs:
38123802
- from: /resources.tar.gz
38133803
to: /io/resources.tar.gz
3814-
- from: /derived/debug/hail/out/hail/2.12/test/assembly.dest/out.jar
3804+
- from: /derived/debug/hail/out/hail/dataproc-2.3.x/test/assembly.dest/out.jar
38153805
to: /io/hail-test.jar
38163806
- from: /repo/hail/testng-services.xml
38173807
to: /io/testng-services.xml

hail/.scalafix.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ RemoveUnused {
3131
}
3232

3333
ForbiddenSymbol.symbols = [
34+
"org.sfl4j",
3435
"scala.collection.compat.immutable.ArraySeq"
3536
]

hail/Makefile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ HAIL_PATCH_VERSION := 137
1919
HAIL_PIP_VERSION := $(HAIL_MAJOR_MINOR_VERSION).$(HAIL_PATCH_VERSION)
2020
HAIL_VERSION := $(HAIL_PIP_VERSION)-$(SHORT_REVISION)
2121

22-
SCALA_VERSION ?= 2.12
23-
SPARK_VERSION ?= 3.5.3
22+
HAIL_DEPLOY_TARGET ?= dataproc-2.3.x
2423

2524
include env_var.mk
2625

@@ -64,7 +63,7 @@ CLOUD_HAIL_DOCTEST_DATA_DIR = $(CLOUD_HAIL_TEST_RESOURCES_PREFIX)/doctest/data/
6463

6564
# mill integration
6665

67-
MILL := SCALA_VERSION=$(SCALA_VERSION) bash mill
66+
MILL := bash mill
6867
MILLOPTS ?=
6968

7069
.PHONY: mill-clean
@@ -77,7 +76,7 @@ mill-clean:
7776
# be recomputed.
7877
FORCE:
7978

80-
SHADOW_JAR := out/hail/$(SCALA_VERSION)/assembly.dest/out.jar
79+
SHADOW_JAR := out/hail/$(HAIL_DEPLOY_TARGET)/assembly.dest/out.jar
8180
ifdef HAIL_COMPILE_NATIVES
8281
$(SHADOW_JAR): native-lib-prebuilt
8382
endif
@@ -87,14 +86,14 @@ $(SHADOW_JAR): FORCE
8786
.PHONY: shadowJar
8887
shadowJar: $(SHADOW_JAR)
8988

90-
NON_SHADOW_JAR := out/hail/$(SCALA_VERSION)/jar.dest/out.jar
89+
NON_SHADOW_JAR := out/hail/$(HAIL_DEPLOY_TARGET)/jar.dest/out.jar
9190
ifdef HAIL_COMPILE_NATIVES
9291
$(NON_SHADOW_JAR): native-lib-prebuilt
9392
endif
9493
$(NON_SHADOW_JAR): FORCE
9594
$(MILL) $(MILLOPTS) hail[].jar
9695

97-
SHADOW_TEST_JAR := out/hail/$(SCALA_VERSION)/test/assembly.dest/out.jar
96+
SHADOW_TEST_JAR := out/hail/$(HAIL_DEPLOY_TARGET)/test/assembly.dest/out.jar
9897
ifdef HAIL_COMPILE_NATIVES
9998
$(SHADOW_TEST_JAR): native-lib-prebuilt
10099
endif
@@ -104,7 +103,7 @@ $(SHADOW_TEST_JAR): FORCE
104103
.PHONY: shadowTestJar
105104
shadowTestJar: $(SHADOW_TEST_JAR)
106105

107-
EXTRA_CLASSPATH := out/hail/$(SCALA_VERSION)/writeRunClasspath.dest/runClasspath
106+
EXTRA_CLASSPATH := out/hail/$(HAIL_DEPLOY_TARGET)/writeRunClasspath.dest/runClasspath
108107
$(EXTRA_CLASSPATH): FORCE
109108
$(MILL) $(MILLOPTS) hail[].writeRunClasspath
110109

hail/build.mill

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//| mill-version: 1.0.4
2-
//| mill-jvm-version: 11
1+
//| mill-version: 1.1.0-RC3
2+
//| mill-jvm-version: 17
33
package build
44

55
import mill.*
@@ -17,14 +17,7 @@ import org.typelevel.scalacoptions.*
1717
object Settings:
1818
val hailMajorMinorVersion = "0.2"
1919
val hailPatchVersion = "137"
20-
val scalaMinorVersions = Map("2.12" -> "2.12.20", "2.12.13" -> "2.12.13", "2.13" -> "2.13.13")
21-
22-
23-
object Env extends Module:
24-
def sparkVersion: T[String] =
25-
Task.Input {
26-
Task.env.getOrElse("SPARK_VERSION", "3.5.3")
27-
}
20+
val scalaMinorVersions = Map("2.12" -> "2.12.20", "2.13" -> "2.13.18")
2821

2922

3023
trait HailJavaModule extends JavaModule:
@@ -35,7 +28,7 @@ trait HailJavaModule extends JavaModule:
3528
else Seq()
3629

3730
val `optim?` =
38-
if buildMode == Release
31+
if BuildMode == Release
3932
then Seq("-O")
4033
else Seq("-g")
4134

@@ -85,10 +78,10 @@ trait HailScalaModule extends ScalaModule, HailJavaModule, ScalafmtModule, Scala
8578
)
8679

8780
val fromBuildMode =
88-
buildMode match {
81+
BuildMode match {
8982
case Dev =>
9083
ScalacOptions.verboseOptions
91-
// + ScalacOptions.checkInit // enable to help debug accessing uninitialized fields
84+
// + ScalacOptions.checkInit // enable to help debug accessing uninitialized fields
9285
case CI =>
9386
Set(ScalacOptions.fatalWarnings)
9487
case Release =>
@@ -163,5 +156,6 @@ trait HailScalaModule extends ScalaModule, HailJavaModule, ScalafmtModule, Scala
163156
richOptions ++ rawOptions
164157
}
165158

166-
trait HailScalaTests extends ScalaTests, HailScalaModule
167-
159+
trait HailScalaTests extends ScalaTests, HailScalaModule:
160+
override def enableBsp: Boolean =
161+
outer.enableBsp

0 commit comments

Comments
 (0)