Skip to content

Commit

Permalink
codegen all value ir node classes
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-schultz committed Jan 13, 2025
1 parent 20aa8e4 commit 9240b76
Show file tree
Hide file tree
Showing 30 changed files with 1,672 additions and 1,923 deletions.
18 changes: 18 additions & 0 deletions hail/build.mill
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ trait HailModule extends ScalaModule with ScalafmtModule with ScalafixModule { o
"-Xlint",
"-Ywarn-unused:_,-explicits,-implicits",
"-Wconf:msg=legacy-binding:s",
"-feature",
) ++ (
if (build.env.debugMode()) Seq()
else Seq(
Expand Down Expand Up @@ -175,6 +176,10 @@ object hail extends HailModule { outer =>
buildInfo(),
)

override def generatedSources: T[Seq[PathRef]] = Task {
Seq(`ir-gen`.generate())
}

override def unmanagedClasspath: T[Agg[PathRef]] =
Agg(shadedazure.assembly())

Expand Down Expand Up @@ -246,6 +251,19 @@ object hail extends HailModule { outer =>
PathRef(T.dest)
}

object `ir-gen` extends HailModule {
def ivyDeps = Agg(
ivy"com.lihaoyi::mainargs:0.6.2",
ivy"com.lihaoyi::os-lib:0.10.7",
ivy"com.lihaoyi::sourcecode:0.4.2",
)

def generate: T[PathRef] = Task {
runner().run(Args("--path", T.dest).value)
PathRef(T.dest)
}
}

object memory extends JavaModule { // with CrossValue {
override def zincIncrementalCompilation: T[Boolean] = false

Expand Down
Loading

0 comments on commit 9240b76

Please sign in to comment.