From a24545f57ce0d874bdd7db23b034a7ef3d5c7b97 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Tue, 23 Feb 2021 19:43:42 +0100 Subject: [PATCH 1/2] Check that publishLocal works fine in tests --- .github/workflows/ci.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad8f04c34..d2a6c04ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,10 +99,33 @@ jobs: - run: amm scripts/site.sc --publishLocal true shell: bash + publishLocal: + runs-on: ubuntu-latest + steps: + - name: Don't convert LF to CRLF during checkout + if: runner.os == 'Windows' + run: | + git config --global core.autocrlf false + git config --global core.eol lf + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + submodules: true + - uses: coursier/cache-action@v5 + with: + extraFiles: "[\".github/scripts/*.sh\", \".github/workflows/ci.yml\", \"scripts/*.sh\", \"scripts/*.sc\", \"examples/*.ipynb\"]" + extraKey: publish-local + - uses: laughedelic/coursier-setup@v1 + with: + jvm: 8 + apps: sbt-launcher + - run: sbt +publishLocal + shell: bash + # job whose name doesn't change when we bump Scala versions, add OSes, … # We require this job for auto-merge. all-tests: - needs: [examples, test, website] + needs: [examples, test, website, publishLocal] runs-on: ubuntu-latest steps: - run: true From 02f5bfa6f2cfc9acae3c69dc5687709913740ac2 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Wed, 24 Feb 2021 14:02:03 +0100 Subject: [PATCH 2/2] Fix compilation for earlier Scala versions --- .../almond/internals/ScalaInterpreterInspections.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/scala/scala-interpreter/src/main/scala-has-metabrowse/almond/internals/ScalaInterpreterInspections.scala b/modules/scala/scala-interpreter/src/main/scala-has-metabrowse/almond/internals/ScalaInterpreterInspections.scala index 557386d8c..27be38763 100644 --- a/modules/scala/scala-interpreter/src/main/scala-has-metabrowse/almond/internals/ScalaInterpreterInspections.scala +++ b/modules/scala/scala-interpreter/src/main/scala-has-metabrowse/almond/internals/ScalaInterpreterInspections.scala @@ -118,7 +118,7 @@ final class ScalaInterpreterInspections( val index = prefix.length + pos val currentFile = new scala.reflect.internal.util.BatchSourceFile( - ammonite.interp.Compiler.makeFile(allCode.getBytes, name = "Current.sc"), + ammonite.compiler.Compiler.makeFile(allCode.getBytes, name = "Current.sc"), allCode )