Skip to content

Commit

Permalink
Need to invoke creation of parser .so library file during the build
Browse files Browse the repository at this point in the history
  • Loading branch information
JaroslavTulach committed Sep 15, 2022
1 parent 4ecb67f commit 79b58d1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,12 @@ lazy val `text-buffer` = project
)
)

val generateRustParserLib = TaskKey[Unit]("generateRustParserLib", "Generates parser native library")
val generateRustParserLibSettings = generateRustParserLib := {
import sys.process._
Seq("cargo", "build", "-p", "enso-parser-jni") !
}

val generateRustParser = TaskKey[Unit]("generateRustParser", "Generates parser sources")
val generateRustParserSettings = generateRustParser := {
import sys.process._
Expand All @@ -666,6 +672,7 @@ val generateRustParserSettings = generateRustParser := {

lazy val `syntax-rust-definition` = project
.in(file("lib/rust/parser"))
// .dependsOn(generateRustParserLib)
.configs(Test)
.settings(
compile := ((Compile / compile) dependsOn generateRustParser).value,
Expand Down

0 comments on commit 79b58d1

Please sign in to comment.