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 v5 #491

Merged
merged 32 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2969659
Rename raw.utils to com.rawlabs.utils.core
miguelbranco80 Aug 21, 2024
f9df1ae
Minor cleanup.
miguelbranco80 Aug 21, 2024
cd70ddf
Rename raw.sources
miguelbranco80 Aug 21, 2024
5116300
Formatting.
miguelbranco80 Aug 21, 2024
85f7286
Fix.
miguelbranco80 Aug 21, 2024
052472b
Renames.
miguelbranco80 Aug 21, 2024
5e7d9c8
Rename modules
miguelbranco80 Aug 21, 2024
ada0cb7
Rename
miguelbranco80 Aug 21, 2024
5493ecd
Fix CI tests.
miguelbranco80 Aug 21, 2024
8c2ba0c
More renames.
miguelbranco80 Aug 21, 2024
7069951
Fix.
miguelbranco80 Aug 21, 2024
4da9b9f
Building
miguelbranco80 Aug 21, 2024
68e3f00
Fix
miguelbranco80 Aug 21, 2024
b90a58b
Fix
miguelbranco80 Aug 21, 2024
aff751e
More renames
miguelbranco80 Aug 21, 2024
a3dd6d5
Formatting.
miguelbranco80 Aug 21, 2024
12c23b7
Renaming frontend
miguelbranco80 Aug 21, 2024
32cce4c
Fixes
miguelbranco80 Aug 21, 2024
79f1180
Rename compiler-snapi-truffle
miguelbranco80 Aug 21, 2024
0a4cb5e
Reformat
miguelbranco80 Aug 21, 2024
e2996a0
Better naming conventions
miguelbranco80 Aug 21, 2024
ca3509c
Fixes
miguelbranco80 Aug 21, 2024
6e82016
Fixes
miguelbranco80 Aug 21, 2024
1cfefb0
Fix CI
miguelbranco80 Aug 21, 2024
fda607a
Fix CI
miguelbranco80 Aug 21, 2024
3df3089
Fix.
miguelbranco80 Aug 22, 2024
e4368e8
WIP
miguelbranco80 Aug 22, 2024
a12e870
More fixes.
miguelbranco80 Aug 22, 2024
4d43244
WIP
miguelbranco80 Aug 22, 2024
73a5da9
Fixes.
miguelbranco80 Aug 22, 2024
ae485a8
Fix
miguelbranco80 Aug 22, 2024
cc3e8a1
Fix
miguelbranco80 Aug 22, 2024
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
  •  
  •  
  •  
19 changes: 10 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ on:
- build.sbt
- project/**
- deps/**
- utils/**
- client/**
- snapi-client/**
- utils-core/**
- utils-sources/**
- compiler/**
- snapi-frontend/**
- parsers/**
- snapi-truffle/**
- python-client/**
- sql-client/**
- snapi-compiler/**
- python-compiler/**
- sql-compiler/**
- .github/workflows/ci.yaml
workflow_dispatch:

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

lazy val root = (project in file("."))
.aggregate(
protocol,
utils,
sources,
client,
protocolCompiler,
protocolRaw,
utilsCore,
utilsSources,
compiler,
snapiParser,
snapiFrontend,
snapiTruffle,
snapiClient,
snapiCompiler,
sqlParser,
sqlClient
sqlCompiler
)
.settings(
commonSettings,
Expand All @@ -57,7 +58,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 +78,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 +103,7 @@ lazy val sources = (project in file("sources"))
)
)

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

lazy val client = (project in file("client"))
lazy val protocolCompiler = (project in file("protocol-compiler"))
.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 compiler = (project in file("compiler"))
.dependsOn(
utils % "compile->compile;test->test",
protocol % "compile->compile;test->test"
utilsCore % "compile->compile;test->test",
protocolCompiler % "compile->compile;test->test"
)
.settings(
commonSettings,
Expand All @@ -133,9 +145,9 @@ lazy val snapiParser = (project in file("snapi-parser"))
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/snapi/parser/generated",
"com.rawlabs.snapi.parser.generated",
s"${javaSrcBasePath.value}/com/rawlabs/snapi/parser/grammar",
"Snapi"
)
),
Expand All @@ -148,9 +160,9 @@ lazy val snapiParser = (project in file("snapi-parser"))

lazy val snapiFrontend = (project in file("snapi-frontend"))
.dependsOn(
utils % "compile->compile;test->test",
client % "compile->compile;test->test",
sources % "compile->compile;test->test",
utilsCore % "compile->compile;test->test",
compiler % "compile->compile;test->test",
utilsSources % "compile->compile;test->test",
snapiParser % "compile->compile;test->test"
)
.settings(
Expand Down Expand Up @@ -184,7 +196,7 @@ val annotationProcessors = Seq(

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

lazy val snapiClient = (project in file("snapi-client"))
lazy val snapiCompiler = (project in file("snapi-compiler"))
.dependsOn(
client % "compile->compile;test->test",
compiler % "compile->compile;test->test",
snapiFrontend % "compile->compile;test->test",
snapiTruffle % "compile->compile;test->test"
)
Expand All @@ -265,9 +277,9 @@ lazy val sqlParser = (project in file("sql-parser"))
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/sql/parser/generated",
"com.rawlabs.sql.parser.generated",
s"${javaSrcBasePath.value}/com/rawlabs/sql/parser/grammar",
"Psql"
)
),
Expand All @@ -278,9 +290,9 @@ lazy val sqlParser = (project in file("sql-parser"))
)
)

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

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

module raw.client {
import com.rawlabs.compiler.CompilerServiceBuilder;

module raw.compiler {
requires scala.library;
requires org.slf4j;
requires org.graalvm.polyglot;
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.protocol.compiler;

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

opens raw.client.api to
opens com.rawlabs.compiler 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

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

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,9 +10,9 @@
* licenses/APL.txt.
*/

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

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

import java.util.ServiceLoader
import scala.collection.JavaConverters._
Expand All @@ -36,7 +36,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

/**
* 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

// 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

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

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

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.protocol.compiler.LocationConfig
import com.rawlabs.utils.core.RawUid

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

import com.fasterxml.jackson.annotation.JsonSubTypes.{Type => JsonType}
import com.fasterxml.jackson.annotation.{JsonSubTypes, JsonTypeInfo}
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

import com.fasterxml.jackson.annotation.JsonSubTypes.{Type => JsonType}
import com.fasterxml.jackson.annotation.{JsonSubTypes, JsonTypeInfo}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* licenses/APL.txt.
*/

package raw.client.utils
package com.rawlabs.compiler.utils

import scala.collection.mutable

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

package raw.client.writers
package com.rawlabs.compiler.writers

import org.graalvm.polyglot.Value

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

package raw.client.writers
package com.rawlabs.compiler.writers

import com.fasterxml.jackson.core.{JsonEncoding, JsonGenerator, JsonParser}
import com.fasterxml.jackson.dataformat.csv.CsvFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* licenses/APL.txt.
*/

package raw.client.writers
package com.rawlabs.compiler.writers

import com.fasterxml.jackson.core.{JsonEncoding, JsonFactory, JsonGenerator, JsonParser}
import org.graalvm.polyglot.{PolyglotException, Value}
Expand Down
Loading