Update scala and libs versions (#544)

This commit is contained in:
Dima 2022-08-01 22:20:45 +03:00 committed by GitHub
parent aa4f3413e9
commit 5a3ef04c2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 30 additions and 27 deletions

View File

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

View File

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

View File

@ -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"

View File

@ -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](

View File

@ -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(

View File

@ -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.*

View File

@ -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",

View File

@ -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": {