Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Monorepo extension and backend. (#76)
Monorepo of Typescript extension with Scala backend * Prototype monorepo of Typescript extension with Scala backend. * move scala source under server/core * server build as submodules * add daffodil to the artifact name * Supply current version in src/version.ts via prebuild script. * Download debugger backend that matches extension version. * change repo from debug to vscode * Fix location of dapodil bin folder * ensure version matches the tag being pushed Co-authored-by: John Wass <wassj@ctc.com> Co-authored-by: Shane Dell <shanedell100@gmail.com>
- Loading branch information
Showing
19 changed files
with
1,761 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -9,3 +9,9 @@ daffodil-debug.txt | ||
daffodil-debugger* | ||
*.debug | ||
datafile-hex | ||
.idea | ||
|
||
|
||
target | ||
.bsp | ||
src/version.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
version = "2.3.2" | ||
maxColumn = 120 | ||
rewrite.rules = [SortImports, RedundantBraces] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
lazy val daffodilVer = "3.1.0" | ||
|
||
lazy val commonSettings = { | ||
Seq( | ||
organization := "org.apache.daffodil", | ||
scalaVersion := "2.12.13", | ||
scalacOptions ++= Seq("-Ypartial-unification"), | ||
git.useGitDescribe := true, | ||
libraryDependencies ++= Seq( | ||
"org.apache.daffodil" %% "daffodil-sapi" % daffodilVer, | ||
"org.apache.daffodil" %% "daffodil-runtime1" % daffodilVer, | ||
) | ||
) | ||
} | ||
|
||
lazy val commonPlugins = Seq(BuildInfoPlugin, GitVersioning, JavaAppPackaging, UniversalPlugin) | ||
|
||
lazy val `daffodil-debugger` = project | ||
.in(file(".")) | ||
.settings(commonSettings) | ||
.settings(publish / skip := true) | ||
.dependsOn(core) | ||
.aggregate(core) | ||
|
||
lazy val core = project | ||
.in(file("server/core")) | ||
.settings(commonSettings) | ||
.settings( | ||
name := "daffodil-debugger", | ||
libraryDependencies ++= Seq( | ||
"ch.qos.logback" % "logback-classic" % "1.2.3", | ||
"com.microsoft.java" % "com.microsoft.java.debug.core" % "0.31.1", | ||
"co.fs2" %% "fs2-io" % "3.0.4", | ||
"com.monovore" %% "decline-effect" % "2.1.0", | ||
"org.typelevel" %% "log4cats-slf4j" % "2.1.0", | ||
), | ||
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion, "daffodilVersion" -> daffodilVer), | ||
buildInfoPackage := "org.apache.daffodil.debugger.dap", | ||
packageName := s"${name.value}-$daffodilVer", | ||
) | ||
.enablePlugins(commonPlugins: _*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/bin/bash | ||
yarn install | ||
yarn compile | ||
yarn vscode:prepublish | ||
yarn package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version = 1.5.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0") | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0") | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.1") | ||
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -16,8 +16,7 @@ | ||
}, | ||
"stopOnEntry": true, | ||
"trace": false, | ||
"debugServer": 4711, | ||
"dapodilVersion": "v0.0.12" | ||
"debugServer": 4711 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.apache.daffodil.debugger.dap | ||
|
||
import java.net.URI | ||
import cats.effect.IO | ||
import cats.syntax.all._ | ||
import org.apache.daffodil.sapi._ | ||
|
||
trait Compiler { | ||
def compile(schema: URI): IO[DataProcessor] | ||
} | ||
|
||
object Compiler { | ||
def apply(): Compiler = | ||
new Compiler { | ||
def compile(schema: URI): IO[DataProcessor] = | ||
IO.blocking( | ||
Daffodil | ||
.compiler() | ||
.compileSource(schema) | ||
).ensureOr(pf => CompilationFailed(pf.getDiagnostics))(!_.isError) | ||
.map(_.onPath("/")) | ||
} | ||
|
||
case class CompilationFailed(seq: Seq[Diagnostic]) | ||
extends Exception(seq.map(_.toString).mkString(", ")) | ||
} |
Oops, something went wrong.