diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e9736eb2..36f93fe4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,15 +56,15 @@ jobs: - name: Check .js exists run: | - JS="cli/.js/target/scala-3.1.0/cli-opt/aqua-${{ env.VERSION }}.js" - mv cli/.js/target/scala-3.1.0/cli-opt/main.js "$JS" + JS="cli/.js/target/scala-3.1.3/cli-opt/aqua-${{ env.VERSION }}.js" + mv cli/.js/target/scala-3.1.3/cli-opt/main.js "$JS" stat "$JS" echo "JS=$JS" >> $GITHUB_ENV - name: Check API .js exists run: | - JSAPI="language-server-api/target/scala-3.1.0/language-server-api-opt/aqua-${{ env.VERSION }}.js" - mv language-server-api/target/scala-3.1.0/language-server-api-opt/main.js "$JSAPI" + JSAPI="language-server-api/target/scala-3.1.3/language-server-api-opt/aqua-${{ env.VERSION }}.js" + mv language-server-api/target/scala-3.1.3/language-server-api-opt/main.js "$JSAPI" stat "$JSAPI" echo "JSAPI=$JSAPI" >> $GITHUB_ENV diff --git a/.github/workflows/test_branch.yml b/.github/workflows/test_branch.yml index eaf31bf5..fa86709a 100644 --- a/.github/workflows/test_branch.yml +++ b/.github/workflows/test_branch.yml @@ -52,7 +52,7 @@ jobs: git clone https://github.com/fluencelabs/aqua-playground.git sbt "cliJS/fastOptJS" rm -rf aqua-playground/src/compiled/examples/* - mv cli/.js/target/scala-3.1.0/cli-fastopt.js npm/aqua.js + mv cli/.js/target/scala-3.1.3/cli-fastopt.js npm/aqua.js cd npm npm i npm run build diff --git a/build.sbt b/build.sbt index 1d81f235..9711560b 100644 --- a/build.sbt +++ b/build.sbt @@ -1,17 +1,17 @@ -val dottyVersion = "3.1.0" +val dottyVersion = "3.1.3" scalaVersion := dottyVersion val baseAquaVersion = settingKey[String]("base aqua version") -val catsV = "2.7.0" -val catsParseV = "0.3.6" +val catsV = "2.8.0" +val catsParseV = "0.3.8" val monocleV = "3.1.0" val scalaTestV = "3.2.10" -val fs2V = "3.2.5" -val catsEffectV = "3.3.7" -val declineV = "2.2.0" -val circeVersion = "0.14.1" +val fs2V = "3.2.11" +val catsEffectV = "3.3.14" +val declineV = "2.3.0" +val circeVersion = "0.14.2" val scribeV = "3.7.1" name := "aqua-hll" diff --git a/compiler/src/main/scala/aqua/compiler/AquaCompiler.scala b/compiler/src/main/scala/aqua/compiler/AquaCompiler.scala index c7073ca7..f6dd6763 100644 --- a/compiler/src/main/scala/aqua/compiler/AquaCompiler.scala +++ b/compiler/src/main/scala/aqua/compiler/AquaCompiler.scala @@ -11,7 +11,7 @@ import aqua.res.AquaRes import aqua.semantics.{CompilerState, Semantics} import aqua.semantics.header.{HeaderHandler, HeaderSem, Picker} import cats.data.* -import cats.data.Validated.{validNec, Invalid, Valid} +import cats.data.Validated.{Invalid, Valid, validNec} import cats.parse.Parser0 import cats.syntax.applicative.* import cats.syntax.flatMap.* @@ -19,7 +19,7 @@ import cats.syntax.functor.* import cats.syntax.monoid.* import cats.syntax.traverse.* import cats.syntax.semigroup.* -import cats.{~>, Comonad, Monad, Monoid, Order} +import cats.{Comonad, Functor, Monad, Monoid, Order, ~>} import scribe.Logging class AquaCompiler[F[_]: Monad, E, I: Order, S[_]: Comonad, C: Monoid: Picker]( diff --git a/compiler/src/main/scala/aqua/compiler/AquaParser.scala b/compiler/src/main/scala/aqua/compiler/AquaParser.scala index 1546f795..85e190f9 100644 --- a/compiler/src/main/scala/aqua/compiler/AquaParser.scala +++ b/compiler/src/main/scala/aqua/compiler/AquaParser.scala @@ -9,15 +9,17 @@ import cats.parse.Parser0 import cats.syntax.applicative.* import cats.syntax.flatMap.* import cats.syntax.functor.* +import cats.syntax.monad.* import cats.syntax.traverse.* import cats.{~>, Comonad, Monad} import scribe.Logging // TODO: add tests -class AquaParser[F[_]: Monad, E, I, S[_]: Comonad]( +class AquaParser[F[_], E, I, S[_]: Comonad]( sources: AquaSources[F, E, I], parser: I => String => ValidatedNec[ParserError[S], Ast[S]] -) extends Logging { +)(implicit F: Monad[F]) + extends Logging { type Body = Ast[S] type Err = AquaError[I, E, S] @@ -37,15 +39,16 @@ class AquaParser[F[_]: Monad, E, I, S[_]: Comonad]( ast.head.tailForced .map(_.head) .collect { case fe: FilenameExpr[F] => - sources - .resolveImport(id, fe.fileValue) - .map( - _.bimap( - _.map[Err](ResolveImportsErr(id, fe.filename, _)), - importId => - Chain.one[(I, (String, Err))](importId -> (fe.fileValue, ImportErr(fe.filename))) - ) + F.map( + sources + .resolveImport(id, fe.fileValue) + )( + _.bimap( + _.map[Err](ResolveImportsErr(id, fe.filename, _)), + importId => + Chain.one[(I, (String, Err))](importId -> (fe.fileValue, ImportErr(fe.filename))) ) + ) } .traverse(identity) .map( diff --git a/compiler/src/main/scala/aqua/compiler/CompilerAPI.scala b/compiler/src/main/scala/aqua/compiler/CompilerAPI.scala index 9b09af58..7af144e0 100644 --- a/compiler/src/main/scala/aqua/compiler/CompilerAPI.scala +++ b/compiler/src/main/scala/aqua/compiler/CompilerAPI.scala @@ -12,7 +12,7 @@ import aqua.semantics.{CompilerState, LspSemantics, RawSemantics, Semantics} import aqua.semantics.header.{HeaderHandler, HeaderSem} import aqua.semantics.lsp.LspContext import cats.data.* -import cats.data.Validated.{validNec, Invalid, Valid} +import cats.data.Validated.{Invalid, Valid, validNec} import cats.parse.Parser0 import cats.syntax.applicative.* import cats.syntax.flatMap.* diff --git a/language-server-npm/package.json b/language-server-npm/package.json index b3073c6e..112237cc 100644 --- a/language-server-npm/package.json +++ b/language-server-npm/package.json @@ -8,7 +8,7 @@ "aqua-lsp-api.d.ts" ], "scripts": { - "move:scalajs": "cp ../language-server-api/target/scala-3.1.0/language-server-api-opt/main.js ./aqua-lsp-api.js" + "move:scalajs": "cp ../language-server-api/target/scala-3.1.3/language-server-api-opt/main.js ./aqua-lsp-api.js" }, "repository": { "type": "git", diff --git a/npm/package.json b/npm/package.json index ae14eff7..f8457f43 100644 --- a/npm/package.json +++ b/npm/package.json @@ -17,7 +17,7 @@ }, "scripts": { "run": "node index.js", - "from:scalajs": "cp ../cli/.js/target/scala-3.1.0/cli-opt/main.js ./aqua.js && npm run build && npm run run -- $@", + "from:scalajs": "cp ../cli/.js/target/scala-3.1.3/cli-opt/main.js ./aqua.js && npm run build && npm run run -- $@", "build": "tsc" }, "dependencies": {