Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renames v4 #490

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 11 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ on:
- build.sbt
- project/**
- deps/**
- utils/**
- client/**
- snapi-client/**
- snapi-frontend/**
- parsers/**
- snapi-truffle/**
- python-client/**
- sql-client/**
- utils-core/**
- compiler-api/**
- compiler-snapi/**
- compiler-snapi-frontend/**
- compiler-snapi-truffle/**
- compiler-python/**
- compiler-sql/**
- .github/workflows/ci.yaml
workflow_dispatch:

Expand Down Expand Up @@ -45,10 +44,10 @@ jobs:
fail-fast: false
matrix:
component:
- snapi-frontend
- snapi-client
- sql-client
- python-client
- compiler-snapi-frontend
- compiler-snapi
- compiler-sql
- compiler-python
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
Expand Down
95 changes: 53 additions & 42 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ writeVersionToFile := {

lazy val root = (project in file("."))
.aggregate(
protocol,
utils,
sources,
client,
snapiParser,
snapiFrontend,
snapiTruffle,
snapiClient,
sqlParser,
sqlClient
compilerProtocol,
utilsCore,
utilsSources,
compilerApi,
compilerSnapiParser,
compilerSnapiFrontend,
compilerSnapiTruffle,
compilerSnapi,
compilerSqlParser,
compilerSql
)
.settings(
commonSettings,
Expand All @@ -57,7 +57,7 @@ lazy val root = (project in file("."))
publishLocal / skip := true
)

lazy val utils = (project in file("utils"))
lazy val utilsCore = (project in file("utils-core"))
.settings(
commonSettings,
scalaCompileSettings,
Expand All @@ -77,9 +77,9 @@ lazy val utils = (project in file("utils"))
jacksonDeps
)

lazy val sources = (project in file("sources"))
lazy val utilsSources = (project in file("utils-sources"))
.dependsOn(
utils % "compile->compile;test->test"
utilsCore % "compile->compile;test->test"
)
.settings(
commonSettings,
Expand All @@ -102,7 +102,7 @@ lazy val sources = (project in file("sources"))
)
)

lazy val protocol = (project in file("protocol"))
lazy val rawProtocol = (project in file("raw-protocol"))
.enablePlugins(ProtobufPlugin)
.settings(
commonSettings,
Expand All @@ -113,10 +113,21 @@ lazy val protocol = (project in file("protocol"))
Compile / unmanagedResourceDirectories += (ProtobufConfig / sourceDirectory).value
)

lazy val client = (project in file("client"))
lazy val compilerProtocol = (project in file("compiler-protocol"))
.enablePlugins(ProtobufPlugin)
.settings(
commonSettings,
commonCompileSettings,
testSettings,
ProtobufConfig / version := "3.25.4",
// Include the protobuf files in the JAR
Compile / unmanagedResourceDirectories += (ProtobufConfig / sourceDirectory).value
)

lazy val compilerApi = (project in file("compiler-api"))
.dependsOn(
utils % "compile->compile;test->test",
protocol % "compile->compile;test->test"
utilsCore % "compile->compile;test->test",
compilerProtocol % "compile->compile;test->test"
)
.settings(
commonSettings,
Expand All @@ -125,17 +136,17 @@ lazy val client = (project in file("client"))
libraryDependencies += trufflePolyglot
)

lazy val snapiParser = (project in file("snapi-parser"))
lazy val compilerSnapiParser = (project in file("compiler-snapi-parser"))
.enablePlugins(GenParserPlugin)
.settings(
commonSettings,
commonCompileSettings,
javaSrcBasePath := s"${baseDirectory.value}/src/main/java",
parserDefinitions := List(
(
s"${javaSrcBasePath.value}/raw/compiler/rql2/generated",
"raw.compiler.rql2.generated",
s"${javaSrcBasePath.value}/raw/snapi/grammar",
s"${javaSrcBasePath.value}/com/rawlabs/compiler/snapi/generated",
"com.rawlabs.compiler.snapi.generated",
s"${javaSrcBasePath.value}/com/rawlabs/compiler/snapi/grammar",
"Snapi"
)
),
Expand All @@ -146,12 +157,12 @@ lazy val snapiParser = (project in file("snapi-parser"))
)
)

lazy val snapiFrontend = (project in file("snapi-frontend"))
lazy val compilerSnapiFrontend = (project in file("compiler-snapi-frontend"))
.dependsOn(
utils % "compile->compile;test->test",
client % "compile->compile;test->test",
sources % "compile->compile;test->test",
snapiParser % "compile->compile;test->test"
utilsCore % "compile->compile;test->test",
compilerApi % "compile->compile;test->test",
utilsSources % "compile->compile;test->test",
compilerSnapiParser % "compile->compile;test->test"
)
.settings(
commonSettings,
Expand Down Expand Up @@ -182,10 +193,10 @@ val annotationProcessors = Seq(
"com.oracle.truffle.dsl.processor.OptionProcessor"
).mkString(",")

lazy val snapiTruffle = (project in file("snapi-truffle"))
lazy val compilerSnapiTruffle = (project in file("compiler-snapi-truffle"))
.dependsOn(
utils % "compile->compile;test->test",
snapiFrontend % "compile->compile;test->test"
utilsCore % "compile->compile;test->test",
compilerSnapiFrontend % "compile->compile;test->test"
)
.enablePlugins(JavaAnnotationProcessorPlugin)
.settings(
Expand Down Expand Up @@ -245,29 +256,29 @@ lazy val snapiTruffle = (project in file("snapi-truffle"))
publishSigned := (publishSigned dependsOn runJavaAnnotationProcessor).value
)

lazy val snapiClient = (project in file("snapi-client"))
lazy val compilerSnapi = (project in file("compiler-snapi"))
.dependsOn(
client % "compile->compile;test->test",
snapiFrontend % "compile->compile;test->test",
snapiTruffle % "compile->compile;test->test"
compilerApi % "compile->compile;test->test",
compilerSnapiFrontend % "compile->compile;test->test",
compilerSnapiTruffle % "compile->compile;test->test"
)
.settings(
commonSettings,
missingInterpolatorCompileSettings,
testSettings
)

lazy val sqlParser = (project in file("sql-parser"))
lazy val compilerSqlParser = (project in file("compiler-sql-parser"))
.enablePlugins(GenParserPlugin)
.settings(
commonSettings,
commonCompileSettings,
javaSrcBasePath := s"${baseDirectory.value}/src/main/java",
parserDefinitions := List(
(
s"${javaSrcBasePath.value}/raw/client/sql/generated",
"raw.client.sql.generated",
s"${javaSrcBasePath.value}/raw/psql/grammar",
s"${javaSrcBasePath.value}/com/rawlabs/compiler/sql/generated",
"com.rawlabs.compiler.sql.generated",
s"${javaSrcBasePath.value}/com/rawlabs/compiler/sql/grammar",
"Psql"
)
),
Expand All @@ -278,10 +289,10 @@ lazy val sqlParser = (project in file("sql-parser"))
)
)

lazy val sqlClient = (project in file("sql-client"))
lazy val compilerSql = (project in file("compiler-sql"))
.dependsOn(
client % "compile->compile;test->test",
sqlParser % "compile->compile;test->test"
compilerApi % "compile->compile;test->test",
compilerSqlParser % "compile->compile;test->test"
)
.settings(
commonSettings,
Expand All @@ -296,9 +307,9 @@ lazy val sqlClient = (project in file("sql-client"))
)
)

lazy val pythonClient = (project in file("python-client"))
lazy val compilerPython = (project in file("compiler-python"))
.dependsOn(
client % "compile->compile;test->test"
compilerApi % "compile->compile;test->test"
)
.settings(
commonSettings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* licenses/APL.txt.
*/

import com.rawlabs.compiler.api.CompilerServiceBuilder;

module raw.client {
requires scala.library;
requires org.slf4j;
Expand All @@ -20,15 +22,15 @@
requires com.fasterxml.jackson.scala;
requires com.fasterxml.jackson.datatype.jsr310;
requires com.fasterxml.jackson.datatype.jdk8;
requires raw.utils;
requires raw.protocol;
requires raw.utils.core;
requires raw.compiler.protocol;

exports raw.client.api;
exports raw.client.writers;
exports raw.client.utils;
exports com.rawlabs.compiler.api;
exports com.rawlabs.compiler.writers;
exports com.rawlabs.compiler.utils;

opens raw.client.api to
opens com.rawlabs.compiler.api to
com.fasterxml.jackson.databind;

uses raw.client.api.CompilerServiceBuilder;
uses CompilerServiceBuilder;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
* licenses/APL.txt.
*/

package raw.client.api
package com.rawlabs.compiler.api

import com.fasterxml.jackson.annotation.{JsonSubTypes, JsonTypeInfo}
import org.graalvm.polyglot.Engine
import raw.utils.{RawException, RawService, RawSettings}

import java.io.OutputStream
import scala.collection.mutable
import com.fasterxml.jackson.annotation.JsonSubTypes.{Type => JsonType}
import com.rawlabs.utils.core.{RawException, RawService, RawSettings}

// Exception that wraps the underlying error so that it includes the extra debug info.
final class CompilerServiceException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
* licenses/APL.txt.
*/

package raw.client.api
package com.rawlabs.compiler.api

import raw.utils.RawSettings
import com.rawlabs.utils.core.RawSettings

trait CompilerServiceBuilder {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
* licenses/APL.txt.
*/

package raw.client.api

import raw.utils.RawSettings
package com.rawlabs.compiler.api

import com.rawlabs.utils.core.RawSettings
import java.util.ServiceLoader
import scala.collection.JavaConverters._
import scala.collection.mutable
Expand All @@ -36,7 +35,7 @@ object CompilerServiceProvider {
}

// This method is only used by the test framework.
private[raw] def set(language: Set[String], instance: CompilerService): Unit = {
def set(language: Set[String], instance: CompilerService): Unit = {
instanceLock.synchronized {
if (instance == null) {
// Stop and remove entries that match the `language`, regardless the class loader.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* licenses/APL.txt.
*/

package raw.client.api
package com.rawlabs.compiler.api

/**
* Package documentation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* licenses/APL.txt.
*/

package raw.client.api
package com.rawlabs.compiler.api

// TODO (msb): Add methods for execution so that same interface is respected by all.
trait Entrypoint {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
* licenses/APL.txt.
*/

package raw.client.api
package com.rawlabs.compiler.api

import com.fasterxml.jackson.annotation.{JsonSubTypes, JsonTypeInfo}
import raw.utils.RawException
import com.fasterxml.jackson.annotation.JsonSubTypes.{Type => JsonType}
import com.rawlabs.utils.core.RawException

/**
* Used for errors that are found during semantic analysis.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* licenses/APL.txt.
*/

package raw.client.api
package com.rawlabs.compiler.api

final case class ProgramDescription(
decls: Map[String, List[DeclDescription]],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* licenses/APL.txt.
*/

package raw.client.api
package com.rawlabs.compiler.api

import com.fasterxml.jackson.core.{JsonGenerator, JsonParser}
import com.fasterxml.jackson.databind.module.SimpleModule
Expand All @@ -24,9 +24,8 @@ import com.fasterxml.jackson.databind.{
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
import com.fasterxml.jackson.module.scala.{ClassTagExtensions, DefaultScalaModule}

import raw.utils.RawUid
import raw.protocol.LocationConfig
import com.rawlabs.utils.core.RawUid
import com.rawlabs.compiler.protocol.LocationConfig

final case class ProgramEnvironment(
uid: RawUid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* licenses/APL.txt.
*/

package raw.client.api
package com.rawlabs.compiler.api

import com.fasterxml.jackson.annotation.JsonSubTypes.{Type => JsonType}
import com.fasterxml.jackson.annotation.{JsonSubTypes, JsonTypeInfo}
Expand Down
Loading