Skip to content

Commit

Permalink
Merge pull request #488 from typelevel/topic/move-to-typelevel
Browse files Browse the repository at this point in the history
Move to Typelevel
  • Loading branch information
milessabin authored Oct 12, 2023
2 parents 9ae4e2c + f6179d6 commit 34705ce
Show file tree
Hide file tree
Showing 157 changed files with 334 additions and 358 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,5 +238,5 @@ jobs:
- name: Submit Dependencies
uses: scalacenter/sbt-dependency-submission@v2
with:
modules-ignore: gsp-graphql-demo_2.13 gsp-graphql-demo_3 benchmarks_2.13 benchmarks_3 rootjs_2.13 rootjs_3 buildinfo_native0.4_2.13 buildinfo_native0.4_3 buildinfo_sjs1_2.13 buildinfo_sjs1_3 profile_2.13 profile_3 rootjvm_2.13 rootjvm_3 rootnative_2.13 rootnative_3 buildinfo_2.13 buildinfo_3
modules-ignore: grackle-demo_2.13 grackle-demo_3 benchmarks_2.13 benchmarks_3 rootjs_2.13 rootjs_3 buildinfo_native0.4_2.13 buildinfo_native0.4_3 buildinfo_sjs1_2.13 buildinfo_sjs1_3 profile_2.13 profile_3 rootjvm_2.13 rootjvm_3 rootnative_2.13 rootnative_3 buildinfo_2.13 buildinfo_3
configs-ignore: test scala-tool scala-doc-tool test-internal
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ and then browsing to [localhost:4000](http://localhost:4000).
- Test it out!
- If you see a typo in the doc, click the link at the bottom and fix it!
- If you find a bug, open an issue (or fix it and open a PR) at our [GitHub
Repository](https://github.com/gemini-hlsw/gsp-graphql).
Repository](https://github.com/typelevel/grackle).
- If you want to make a larger contribution please open an issue first so we can discuss.
6 changes: 3 additions & 3 deletions benchmarks/src/main/scala/ParserBenchmark.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package edu.gemini.grackle.benchmarks
package grackle.benchmarks

import edu.gemini.grackle.Schema
import grackle.Schema
import org.openjdk.jmh.annotations._
import org.openjdk.jmh.infra.Blackhole;

Expand All @@ -46,7 +46,7 @@ import scala.io.Source
*
* Or to run the benchmark from within sbt:
*
* jmh:run -i 10 -wi 10 -f 2 -t 1 edu.gemini.grackle.benchmarks.ParserBenchmark
* jmh:run -i 10 -wi 10 -f 2 -t 1 grackle.benchmarks.ParserBenchmark
*
* Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread".
* Please note that benchmarks should be usually executed at least in
Expand Down
18 changes: 9 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ val Scala3 = "3.3.1"
ThisBuild / scalaVersion := Scala2
ThisBuild / crossScalaVersions := Seq(Scala2, Scala3)

ThisBuild / tlBaseVersion := "0.14"
ThisBuild / organization := "edu.gemini"
ThisBuild / tlBaseVersion := "0.15"
ThisBuild / organization := "org.typelevel"
ThisBuild / organizationName := "Association of Universities for Research in Astronomy, Inc. (AURA)"
ThisBuild / startYear := Some(2019)
ThisBuild / licenses := Seq(("BSD-3-Clause", new URL("https://opensource.org/licenses/BSD-3-Clause")))
Expand Down Expand Up @@ -106,7 +106,7 @@ lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.disablePlugins(RevolverPlugin)
.settings(commonSettings)
.settings(
name := "gsp-graphql-core",
name := "grackle-core",
libraryDependencies ++=
Seq(
"org.typelevel" %%% "cats-parse" % catsParseVersion,
Expand All @@ -131,7 +131,7 @@ lazy val circe = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.dependsOn(core)
.settings(commonSettings)
.settings(
name := "gsp-graphql-circe",
name := "grackle-circe",
)

lazy val buildInfo = crossProject(JVMPlatform, JSPlatform, NativePlatform)
Expand All @@ -151,7 +151,7 @@ lazy val sql = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.dependsOn(core % "test->test;compile->compile", circe, buildInfo % Test)
.settings(commonSettings)
.settings(
name := "gsp-graphql-sql",
name := "grackle-sql",
libraryDependencies ++= Seq(
"io.circe" %%% "circe-generic" % circeVersion % "test",
"co.fs2" %%% "fs2-io" % fs2Version % "test",
Expand All @@ -175,7 +175,7 @@ lazy val doobie = project
.dependsOn(sql.jvm % "test->test;compile->compile", circe.jvm)
.settings(commonSettings)
.settings(
name := "gsp-graphql-doobie-pg",
name := "grackle-doobie-pg",
Test / fork := true,
Test / parallelExecution := false,
libraryDependencies ++= Seq(
Expand All @@ -194,7 +194,7 @@ lazy val skunk = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.dependsOn(sql % "test->test;compile->compile", circe)
.settings(commonSettings)
.settings(
name := "gsp-graphql-skunk",
name := "grackle-skunk",
Test / parallelExecution := false,
libraryDependencies ++= Seq(
"org.tpolecat" %%% "skunk-core" % skunkVersion,
Expand All @@ -216,7 +216,7 @@ lazy val generic = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.dependsOn(core)
.settings(commonSettings)
.settings(
name := "gsp-graphql-generic",
name := "grackle-generic",
libraryDependencies += (
scalaVersion.value match {
case Scala3 => "org.typelevel" %%% "shapeless3-deriving" % shapeless3Version
Expand All @@ -230,7 +230,7 @@ lazy val demo = project
.dependsOn(core.jvm, generic.jvm, doobie)
.settings(commonSettings)
.settings(
name := "gsp-graphql-demo",
name := "grackle-demo",
libraryDependencies ++= Seq(
"org.typelevel" %% "log4cats-slf4j" % log4catsVersion,
"ch.qos.logback" % "logback-classic" % logbackVersion,
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/scala/demo/GraphQLService.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package demo

import cats.effect.Concurrent
import cats.syntax.all._
import edu.gemini.grackle.Mapping
import grackle.Mapping
import io.circe.{Json, ParsingFailure, parser}
import org.http4s.circe._
import org.http4s.dsl.Http4sDsl
Expand Down
14 changes: 7 additions & 7 deletions demo/src/main/scala/demo/starwars/StarWarsMapping.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
package demo.starwars

import cats.syntax.all._
import edu.gemini.grackle.Predicate._
import edu.gemini.grackle.Query._
import edu.gemini.grackle.QueryCompiler._
import edu.gemini.grackle.Value._
import edu.gemini.grackle._
import edu.gemini.grackle.generic._
import edu.gemini.grackle.syntax._
import grackle.Predicate._
import grackle.Query._
import grackle.QueryCompiler._
import grackle.Value._
import grackle._
import grackle.generic._
import grackle.syntax._

trait StarWarsMapping[F[_]] extends GenericMapping[F] { self: StarWarsData[F] =>
// #schema
Expand Down
16 changes: 8 additions & 8 deletions demo/src/main/scala/demo/world/WorldMapping.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ package demo.world

import _root_.doobie.{Meta, Transactor}
import cats.effect.Sync
import edu.gemini.grackle.Predicate._
import edu.gemini.grackle.Query._
import edu.gemini.grackle.QueryCompiler._
import edu.gemini.grackle.Value._
import edu.gemini.grackle._
import edu.gemini.grackle.doobie.postgres.{DoobieMapping, DoobieMonitor, LoggedDoobieMappingCompanion}
import edu.gemini.grackle.sql.Like
import edu.gemini.grackle.syntax._
import grackle.Predicate._
import grackle.Query._
import grackle.QueryCompiler._
import grackle.Value._
import grackle._
import grackle.doobie.postgres.{DoobieMapping, DoobieMonitor, LoggedDoobieMappingCompanion}
import grackle.sql.Like
import grackle.syntax._
import org.typelevel.log4cats.Logger
import org.typelevel.log4cats.slf4j.Slf4jLogger

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ To learn about Grackle please read the @ref:[Tutorial](tutorial/index.md) and ma

- Test it out!
- If you see a typo in the doc, click the link at the bottom and fix it!
- If you find a bug, open an issue (or fix it and open a PR) at our [GitHub Repository](https://github.com/gemini-hlsw/gsp-graphql).
- If you find a bug, open an issue (or fix it and open a PR) at our [GitHub Repository](https://github.com/typelevel/grackle).
- If you want to make a larger contribution please open an issue first so we can discuss.
40 changes: 14 additions & 26 deletions docs/src/main/paradox/tutorial/db-backed-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,23 @@ The demo is packaged as submodule `demo` in the Grackle project. It is a http4s-
from the SBT REPL using `sbt-revolver`,

```
sbt:gsp-graphql> reStart
sbt:root> demo/reStart
[info] Application demo not yet started
[info] Starting application demo in the background ...
demo Starting demo.Main.main()
demo[ERROR] Picked up JAVA_TOOL_OPTIONS: -Xmx3489m
[success] Total time: 0 s, completed Sep 3, 2023, 5:01:11 AM
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.license.VersionPrinter printVersionOnly
demo[ERROR] INFO: Flyway Community Edition 9.22.0 by Redgate
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.license.VersionPrinter printVersion
demo[ERROR] INFO: See release notes here: https://rd.gt/416ObMi
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.license.VersionPrinter printVersion
demo[ERROR] INFO:
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.FlywayExecutor execute
demo[ERROR] INFO: Database: jdbc:postgresql://0.0.0.0:32771/test (PostgreSQL 11.8)
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory allAppliedMigrations
demo[ERROR] INFO: Schema history table "public"."flyway_schema_history" does not exist yet
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.command.DbValidate validate
demo[ERROR] INFO: Successfully validated 1 migration (execution time 00:00.059s)
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory create
demo[ERROR] INFO: Creating Schema History table "public"."flyway_schema_history" ...
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.command.DbMigrate migrateGroup
demo[ERROR] INFO: Current version of schema "public": << Empty Schema >>
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.command.DbMigrate doMigrateGroup
demo[ERROR] INFO: Migrating schema "public" to version "1 - WorldSetup"
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor printWarnings
demo[ERROR] WARNING: DB: there is already a transaction in progress (SQL State: 25001 - Error Code: 0)
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.command.DbMigrate logSummary
demo[ERROR] INFO: Successfully applied 1 migration to schema "public", now at version v1 (execution time 00:00.110s)
demo [io-compute-2] INFO o.h.e.s.EmberServerBuilderCompanionPlatform - Ember-Server service bound to address: [::]:8080
[success] Total time: 0 s, completed 12 Oct 2023, 11:12:09
demo [io-compute-blocker-8] INFO o.f.c.i.l.VersionPrinter - Flyway Community Edition 9.22.2 by Redgate
demo [io-compute-blocker-8] INFO o.f.c.i.l.VersionPrinter - See release notes here: https://rd.gt/416ObMi
demo [io-compute-blocker-8] INFO o.f.c.i.l.VersionPrinter -
demo [io-compute-blocker-8] INFO o.f.c.FlywayExecutor - Database: jdbc:postgresql://0.0.0.0:32952/test (PostgreSQL 11.8)
demo [io-compute-blocker-8] INFO o.f.c.i.s.JdbcTableSchemaHistory - Schema history table "public"."flyway_schema_history" does not exist yet
demo [io-compute-blocker-8] INFO o.f.c.i.c.DbValidate - Successfully validated 1 migration (execution time 00:00.030s)
demo [io-compute-blocker-8] INFO o.f.c.i.s.JdbcTableSchemaHistory - Creating Schema History table "public"."flyway_schema_history" ...
demo [io-compute-blocker-8] INFO o.f.c.i.c.DbMigrate - Current version of schema "public": << Empty Schema >>
demo [io-compute-blocker-8] INFO o.f.c.i.c.DbMigrate - Migrating schema "public" to version "1 - WorldSetup"
demo [io-compute-blocker-8] WARN o.f.c.i.s.DefaultSqlScriptExecutor - DB: there is already a transaction in progress (SQL State: 25001 - Error Code: 0)
demo [io-compute-blocker-8] INFO o.f.c.i.c.DbMigrate - Successfully applied 1 migration to schema "public", now at version v1 (execution time 00:00.148s)
demo [io-compute-0] INFO o.h.e.s.EmberServerBuilderCompanionPlatform - Ember-Server service bound to address: [::]:8080
```

This application hosts the demo services for in-memory and db-backend models, as well as a web-based GraphQL client
Expand Down
40 changes: 14 additions & 26 deletions docs/src/main/paradox/tutorial/in-memory-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,23 @@ The demo is packaged as submodule `demo` in the Grackle project. It is a http4s-
from the SBT REPL using `sbt-revolver`,

```
sbt:gsp-graphql> reStart
sbt:root> demo/reStart
[info] Application demo not yet started
[info] Starting application demo in the background ...
demo Starting demo.Main.main()
demo[ERROR] Picked up JAVA_TOOL_OPTIONS: -Xmx3489m
[success] Total time: 0 s, completed Sep 3, 2023, 5:01:11 AM
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.license.VersionPrinter printVersionOnly
demo[ERROR] INFO: Flyway Community Edition 9.22.0 by Redgate
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.license.VersionPrinter printVersion
demo[ERROR] INFO: See release notes here: https://rd.gt/416ObMi
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.license.VersionPrinter printVersion
demo[ERROR] INFO:
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.FlywayExecutor execute
demo[ERROR] INFO: Database: jdbc:postgresql://0.0.0.0:32771/test (PostgreSQL 11.8)
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory allAppliedMigrations
demo[ERROR] INFO: Schema history table "public"."flyway_schema_history" does not exist yet
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.command.DbValidate validate
demo[ERROR] INFO: Successfully validated 1 migration (execution time 00:00.059s)
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory create
demo[ERROR] INFO: Creating Schema History table "public"."flyway_schema_history" ...
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.command.DbMigrate migrateGroup
demo[ERROR] INFO: Current version of schema "public": << Empty Schema >>
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.command.DbMigrate doMigrateGroup
demo[ERROR] INFO: Migrating schema "public" to version "1 - WorldSetup"
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor printWarnings
demo[ERROR] WARNING: DB: there is already a transaction in progress (SQL State: 25001 - Error Code: 0)
demo[ERROR] Sep 03, 2023 5:01:18 AM org.flywaydb.core.internal.command.DbMigrate logSummary
demo[ERROR] INFO: Successfully applied 1 migration to schema "public", now at version v1 (execution time 00:00.110s)
demo [io-compute-2] INFO o.h.e.s.EmberServerBuilderCompanionPlatform - Ember-Server service bound to address: [::]:8080
[success] Total time: 0 s, completed 12 Oct 2023, 11:12:09
demo [io-compute-blocker-8] INFO o.f.c.i.l.VersionPrinter - Flyway Community Edition 9.22.2 by Redgate
demo [io-compute-blocker-8] INFO o.f.c.i.l.VersionPrinter - See release notes here: https://rd.gt/416ObMi
demo [io-compute-blocker-8] INFO o.f.c.i.l.VersionPrinter -
demo [io-compute-blocker-8] INFO o.f.c.FlywayExecutor - Database: jdbc:postgresql://0.0.0.0:32952/test (PostgreSQL 11.8)
demo [io-compute-blocker-8] INFO o.f.c.i.s.JdbcTableSchemaHistory - Schema history table "public"."flyway_schema_history" does not exist yet
demo [io-compute-blocker-8] INFO o.f.c.i.c.DbValidate - Successfully validated 1 migration (execution time 00:00.030s)
demo [io-compute-blocker-8] INFO o.f.c.i.s.JdbcTableSchemaHistory - Creating Schema History table "public"."flyway_schema_history" ...
demo [io-compute-blocker-8] INFO o.f.c.i.c.DbMigrate - Current version of schema "public": << Empty Schema >>
demo [io-compute-blocker-8] INFO o.f.c.i.c.DbMigrate - Migrating schema "public" to version "1 - WorldSetup"
demo [io-compute-blocker-8] WARN o.f.c.i.s.DefaultSqlScriptExecutor - DB: there is already a transaction in progress (SQL State: 25001 - Error Code: 0)
demo [io-compute-blocker-8] INFO o.f.c.i.c.DbMigrate - Successfully applied 1 migration to schema "public", now at version v1 (execution time 00:00.148s)
demo [io-compute-0] INFO o.h.e.s.EmberServerBuilderCompanionPlatform - Ember-Server service bound to address: [::]:8080
```

This application hosts the demo services for in-memory and db-backend models, as well as a web-based GraphQL client
Expand Down
2 changes: 1 addition & 1 deletion modules/circe/src/main/scala/circemapping.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2016-2020 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause

package edu.gemini.grackle
package grackle
package circe

import scala.collection.Factory
Expand Down
6 changes: 3 additions & 3 deletions modules/circe/src/test/scala/CirceData.scala
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Copyright (c) 2016-2020 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause

package edu.gemini.grackle
package grackle
package circetests

import cats.effect.IO
import cats.data.OptionT
import io.circe.Json
import io.circe.literal._

import edu.gemini.grackle.circe.CirceMapping
import edu.gemini.grackle.syntax._
import grackle.circe.CirceMapping
import grackle.syntax._

import Query._
import QueryCompiler._
Expand Down
6 changes: 3 additions & 3 deletions modules/circe/src/test/scala/CirceEffectData.scala
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Copyright (c) 2016-2020 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause

package edu.gemini.grackle
package grackle
package circetests

import cats.effect.Sync
import cats.implicits._
import fs2.concurrent.SignallingRef
import io.circe.{Encoder, Json}

import edu.gemini.grackle.circe.CirceMapping
import edu.gemini.grackle.syntax._
import grackle.circe.CirceMapping
import grackle.syntax._

class TestCirceEffectMapping[F[_]: Sync](ref: SignallingRef[F, Int]) extends CirceMapping[F] {
val schema =
Expand Down
2 changes: 1 addition & 1 deletion modules/circe/src/test/scala/CirceEffectSuite.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2016-2020 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause

package edu.gemini.grackle
package grackle
package circetests

import cats.effect.IO
Expand Down
2 changes: 1 addition & 1 deletion modules/circe/src/test/scala/CirceSuite.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2016-2020 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause

package edu.gemini.grackle
package grackle
package circetests

import io.circe.literal._
Expand Down
12 changes: 6 additions & 6 deletions modules/core/src/main/scala-2/syntax2.scala
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Copyright (c) 2016-2020 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause

package edu.gemini.grackle
package grackle

import cats.data.NonEmptyChain
import cats.syntax.all._
import org.typelevel.literally.Literally
import edu.gemini.grackle.Ast.Document
import edu.gemini.grackle.GraphQLParser.Document.parseAll
import edu.gemini.grackle.Schema
import grackle.Ast.Document
import grackle.GraphQLParser.Document.parseAll
import grackle.Schema

trait VersionSpecificSyntax {
implicit def toStringContextOps(sc: StringContext): StringContextOps =
Expand All @@ -28,7 +28,7 @@ object SchemaLiteral extends Literally[Schema] {
t => s"Internal error: ${t.getMessage}",
ps => s"Invalid schema: ${ps.toList.distinct.mkString("\n 🐞 ", "\n 🐞 ", "\n")}",
)
Schema(s).toEither.bimap(mkError, _ => c.Expr(q"_root_.edu.gemini.grackle.Schema($s).toOption.get"))
Schema(s).toEither.bimap(mkError, _ => c.Expr(q"_root_.grackle.Schema($s).toOption.get"))
}
def make(c: Context)(args: c.Expr[Any]*): c.Expr[Schema] = apply(c)(args: _*)
}
Expand All @@ -38,7 +38,7 @@ object DocumentLiteral extends Literally[Document] {
import c.universe._
parseAll(s).bimap(
pf => show"Invalid document: $pf",
_ => c.Expr(q"_root_.edu.gemini.grackle.GraphQLParser.Document.parseAll($s).toOption.get"),
_ => c.Expr(q"_root_.grackle.GraphQLParser.Document.parseAll($s).toOption.get"),
)
}
def make(c: Context)(args: c.Expr[Any]*): c.Expr[Document] = apply(c)(args: _*)
Expand Down
6 changes: 3 additions & 3 deletions modules/core/src/main/scala-3/syntax3.scala
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright (c) 2016-2020 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause

package edu.gemini.grackle
package grackle

import cats.syntax.all._
import org.typelevel.literally.Literally
import edu.gemini.grackle.Ast.Document
import edu.gemini.grackle.GraphQLParser.Document.parseAll
import grackle.Ast.Document
import grackle.GraphQLParser.Document.parseAll

trait VersionSpecificSyntax:

Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/main/scala/ast.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2016-2020 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause

package edu.gemini.grackle
package grackle

object Ast {

Expand Down
Loading

0 comments on commit 34705ce

Please sign in to comment.