From 028615e3aca293beee7ce859a20fa0f4f5660c62 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Wed, 21 Aug 2019 18:06:50 +0200 Subject: [PATCH] Create dotty staging library --- .drone.yml | 2 +- build.sbt | 1 + .../dotc/consumetasty/ConsumeTasty.scala | 20 +++++++- .../dotc/core/quoted/PickledQuotes.scala | 6 +-- .../tools/dotc/core/tasty/TreeUnpickler.scala | 6 +-- .../dotc/quoted/ExprCompilationUnit.scala | 9 ---- .../tools/dotc/quoted/QuoteContext.scala | 12 +++++ .../dotty/tools/dotc/quoted/ToolboxImpl.scala | 46 ----------------- .../dotty/tools/dotc/transform/Splicer.scala | 6 +-- compiler/test/dotty/Properties.scala | 3 ++ .../BootstrappedOnlyCompilationTests.scala | 7 ++- compiler/test/dotty/tools/repl/ReplTest.scala | 6 +-- .../tools/vulpix/TestConfiguration.scala | 14 +++++ dist/bin/common | 1 + dist/bin/dotr | 2 +- .../scala/quoted/package.scala | 51 ------------------- library/src/scala/quoted/Expr.scala | 8 --- library/src/scala/quoted/ScopeException.scala | 3 ++ .../quoted/staging/RunScopeException.scala | 3 -- .../staging/ToolboxNotFoundException.scala | 3 -- project/Build.scala | 43 +++++++++++++--- project/Modes.scala | 4 ++ project/scripts/bootstrapCmdTests | 2 +- .../quoted-example-project/build.sbt | 3 +- .../quoted/staging/ExprCompilationUnit.scala | 8 +++ .../scala/quoted/staging}/QuoteCompiler.scala | 9 ++-- .../scala/quoted/staging}/QuoteDriver.scala | 18 +++---- .../src/scala/quoted/staging/Toolbox.scala | 49 +++++++++--------- .../src/scala/quoted/staging/staging.scala | 7 ++- .../test-resources/repl-staging}/i6007 | 0 .../test-resources/repl-staging}/i6263 | 0 .../repl/StagingScriptedReplTests.scala | 15 ++++++ .../i5941/macro_1.scala | 0 .../i5941/usage_2.scala | 0 .../quote-run-in-macro-1/quoted_1.scala | 0 .../quote-run-in-macro-1/quoted_2.scala | 0 .../quote-0.scala | 0 .../quote-assert/quoted_1.scala | 0 .../quote-assert/quoted_2.scala | 0 tests/run-macros/i6765/Macro_1.scala | 3 -- .../quote-matcher-type-bind/Macro_1.scala | 0 .../quote-matcher-type-bind/Test_2.scala | 0 .../reflect-inline/assert_1.scala | 0 .../reflect-inline/test_2.scala | 0 .../i3823-b.check | 0 .../i3823-b.scala | 0 .../i3823-c.check | 0 .../i3823-c.scala | 0 .../i3823.check | 0 .../i3823.scala | 0 .../i3847-b.check | 0 .../i3847-b.scala | 0 .../i3847.check | 0 .../i3847.scala | 0 .../i3876-b.check | 0 .../i3876-b.scala | 0 .../i3876-c.check | 0 .../i3876-c.scala | 0 .../i3876-d.check | 0 .../i3876-d.scala | 0 .../i3876-e.check | 0 .../i3876-e.scala | 0 .../i3876.check | 0 .../i3876.scala | 0 .../i3946.check | 0 .../i3946.scala | 0 .../i3947.check | 0 .../i3947.scala | 0 .../i3947b.check | 0 .../i3947b.scala | 0 .../i3947b2.check | 0 .../i3947b2.scala | 0 .../i3947b3.check | 0 .../i3947b3.scala | 0 .../i3947c.check | 0 .../i3947c.scala | 0 .../i3947d.check | 0 .../i3947d.scala | 0 .../i3947d2.check | 0 .../i3947d2.scala | 0 .../i3947e.check | 0 .../i3947e.scala | 0 .../i3947f.check | 0 .../i3947f.scala | 0 .../i3947g.check | 0 .../i3947g.scala | 0 .../i3947i.check | 0 .../i3947i.scala | 0 .../i3947j.check | 0 .../i3947j.scala | 0 .../i4044a.check | 0 .../i4044a.scala | 0 .../i4044b.check | 0 .../i4044b.scala | 0 .../i4044c.check | 0 .../i4044c.scala | 0 .../i4044d.check | 0 .../i4044d.scala | 0 .../i4044e.check | 0 .../i4044e.scala | 0 .../i4044f.check | 0 .../i4044f.scala | 0 .../i4350.check | 0 .../i4350.scala | 0 .../i4591.check | 0 .../i4591.scala | 0 .../i4730.scala | 2 +- .../i5144.check | 0 .../i5144.scala | 0 .../i5144b.check | 0 .../i5144b.scala | 0 .../i5152.check | 0 .../i5152.scala | 0 .../i5161.check | 0 .../i5161.scala | 0 .../i5161b.check | 0 .../i5161b.scala | 0 .../i5247.check | 0 .../i5247.scala | 0 .../i5376.check | 0 .../i5376.scala | 0 .../i5434.check | 0 .../i5434.scala | 0 .../i5965.check | 0 .../i5965.scala | 0 .../i5965b.check | 0 .../i5965b.scala | 0 .../i5997.check | 0 .../i5997.scala | 0 .../i6263.scala | 0 .../i6281.scala | 0 .../i6754.check | 0 .../i6754.scala | 2 +- .../i6992/Macro_1.scala | 2 +- .../i6992/Test_2.scala | 0 .../inline-quote.check | 0 .../inline-quote.scala | 0 .../quote-ackermann-1.check | 0 .../quote-ackermann-1.scala | 0 .../quote-compile-constants.check | 0 .../quote-fun-app-1.check | 0 .../quote-fun-app-1.scala | 0 .../quote-function-applied-to.check | 0 .../quote-function-applied-to.scala | 0 .../quote-lambda.scala | 0 .../quote-lib.check | 0 .../quote-lib.scala | 0 .../quote-lift-Array.check | 0 .../quote-lift-Array.scala | 0 .../quote-lift-BigDecimal.check | 0 .../quote-lift-BigDecimal.scala | 0 .../quote-lift-BigInt.check | 0 .../quote-lift-BigInt.scala | 0 .../quote-lift-IArray.check | 0 .../quote-lift-IArray.scala | 0 .../quote-macro-in-splice.check | 0 .../quote-macro-in-splice/quoted_1.scala | 0 .../quote-macro-in-splice/quoted_2.scala | 0 .../quote-matcher-type-bind.check | 0 .../quote-nested-1.check | 0 .../quote-nested-1.scala | 0 .../quote-nested-2.check | 0 .../quote-nested-2.scala | 0 .../quote-nested-3.check | 0 .../quote-nested-3.scala | 0 .../quote-nested-4.check | 0 .../quote-nested-4.scala | 0 .../quote-nested-5.check | 0 .../quote-nested-5.scala | 0 .../quote-owners-2.check | 0 .../quote-owners-2.scala | 0 .../quote-owners.check | 0 .../quote-owners.scala | 0 .../quote-run-2.check | 0 .../quote-run-2.scala | 0 .../quote-run-b.check | 0 .../quote-run-b.scala | 0 .../quote-run-c.check | 0 .../quote-run-c.scala | 0 .../quote-run-constants.check | 0 .../quote-run-constants.scala | 0 .../quote-run-large.scala | 0 .../quote-run-many.scala | 0 .../quote-run-staged-interpreter.check | 0 .../quote-run-staged-interpreter.scala | 0 .../quote-run-with-settings.check | 0 .../quote-run-with-settings.scala | 0 .../quote-run.check | 0 .../quote-run.scala | 0 .../quote-show-blocks.check | 0 .../quote-show-blocks.scala | 0 .../quote-simple-hole.scala | 0 .../quote-toExprOfTuple.check | 0 .../quote-toExprOfTuple.scala | 0 .../quote-two-captured-ref.check | 0 .../quote-two-captured-ref.scala | 0 .../quote-type-tags.check | 0 .../quote-type-tags.scala | 0 .../quote-unrolled-foreach.check | 0 .../quote-unrolled-foreach.scala | 0 .../quote-valueof-list.check | 0 .../quote-valueof-list.scala | 0 .../quote-valueof.check | 0 .../quote-valueof.scala | 0 .../quote-var.check | 0 .../quote-var.scala | 0 .../shonan-hmm-simple.check | 0 .../shonan-hmm-simple.scala | 0 .../shonan-hmm.check | 0 .../shonan-hmm/Blas.scala | 0 .../shonan-hmm/Complex.scala | 0 .../shonan-hmm/Lifters.scala | 0 .../shonan-hmm/MVmult.scala | 0 .../shonan-hmm/PV.scala | 0 .../shonan-hmm/Ring.scala | 0 .../shonan-hmm/Test.scala | 0 .../shonan-hmm/UnrolledExpr.scala | 0 .../shonan-hmm/Vec.scala | 0 .../shonan-hmm/VecOp.scala | 0 .../shonan-hmm/VecROp.scala | 0 .../shonan-hmm/Vmults.scala | 0 .../staged-streams_1.check | 0 .../staged-streams_1.scala | 0 .../staged-tuples/StagedTuple.scala | 0 .../staged-tuples/Test.scala | 0 .../tasty-extractors-constants-2.check | 0 .../quoted_1.scala | 0 .../quoted_2.scala | 0 228 files changed, 181 insertions(+), 195 deletions(-) delete mode 100644 compiler/src/dotty/tools/dotc/quoted/ExprCompilationUnit.scala delete mode 100644 compiler/src/dotty/tools/dotc/quoted/ToolboxImpl.scala delete mode 100644 library/src-non-bootstrapped/scala/quoted/package.scala create mode 100644 library/src/scala/quoted/ScopeException.scala delete mode 100644 library/src/scala/quoted/staging/RunScopeException.scala delete mode 100644 library/src/scala/quoted/staging/ToolboxNotFoundException.scala create mode 100644 staging/src/scala/quoted/staging/ExprCompilationUnit.scala rename {compiler/src/dotty/tools/dotc/quoted => staging/src/scala/quoted/staging}/QuoteCompiler.scala (96%) rename {compiler/src/dotty/tools/dotc/quoted => staging/src/scala/quoted/staging}/QuoteDriver.scala (88%) rename {library => staging}/src/scala/quoted/staging/Toolbox.scala (60%) rename library/src-bootstrapped/scala/quoted/staging/package.scala => staging/src/scala/quoted/staging/staging.scala (90%) rename {compiler/test-resources/repl-macros => staging/test-resources/repl-staging}/i6007 (100%) rename {compiler/test-resources/repl-macros => staging/test-resources/repl-staging}/i6263 (100%) create mode 100644 staging/test/scala/quoted/staging/repl/StagingScriptedReplTests.scala rename tests/{neg-with-compiler => neg-staging}/i5941/macro_1.scala (100%) rename tests/{neg-with-compiler => neg-staging}/i5941/usage_2.scala (100%) rename tests/{neg-with-compiler => neg-staging}/quote-run-in-macro-1/quoted_1.scala (100%) rename tests/{neg-with-compiler => neg-staging}/quote-run-in-macro-1/quoted_2.scala (100%) rename tests/{pos-with-compiler => pos-staging}/quote-0.scala (100%) rename tests/{pos-with-compiler => pos-staging}/quote-assert/quoted_1.scala (100%) rename tests/{pos-with-compiler => pos-staging}/quote-assert/quoted_2.scala (100%) rename tests/{run-with-compiler => run-macros}/quote-matcher-type-bind/Macro_1.scala (100%) rename tests/{run-with-compiler => run-macros}/quote-matcher-type-bind/Test_2.scala (100%) rename tests/{run-with-compiler => run-macros}/reflect-inline/assert_1.scala (100%) rename tests/{run-with-compiler => run-macros}/reflect-inline/test_2.scala (100%) rename tests/{run-with-compiler => run-staging}/i3823-b.check (100%) rename tests/{run-with-compiler => run-staging}/i3823-b.scala (100%) rename tests/{run-with-compiler => run-staging}/i3823-c.check (100%) rename tests/{run-with-compiler => run-staging}/i3823-c.scala (100%) rename tests/{run-with-compiler => run-staging}/i3823.check (100%) rename tests/{run-with-compiler => run-staging}/i3823.scala (100%) rename tests/{run-with-compiler => run-staging}/i3847-b.check (100%) rename tests/{run-with-compiler => run-staging}/i3847-b.scala (100%) rename tests/{run-with-compiler => run-staging}/i3847.check (100%) rename tests/{run-with-compiler => run-staging}/i3847.scala (100%) rename tests/{run-with-compiler => run-staging}/i3876-b.check (100%) rename tests/{run-with-compiler => run-staging}/i3876-b.scala (100%) rename tests/{run-with-compiler => run-staging}/i3876-c.check (100%) rename tests/{run-with-compiler => run-staging}/i3876-c.scala (100%) rename tests/{run-with-compiler => run-staging}/i3876-d.check (100%) rename tests/{run-with-compiler => run-staging}/i3876-d.scala (100%) rename tests/{run-with-compiler => run-staging}/i3876-e.check (100%) rename tests/{run-with-compiler => run-staging}/i3876-e.scala (100%) rename tests/{run-with-compiler => run-staging}/i3876.check (100%) rename tests/{run-with-compiler => run-staging}/i3876.scala (100%) rename tests/{run-with-compiler => run-staging}/i3946.check (100%) rename tests/{run-with-compiler => run-staging}/i3946.scala (100%) rename tests/{run-with-compiler => run-staging}/i3947.check (100%) rename tests/{run-with-compiler => run-staging}/i3947.scala (100%) rename tests/{run-with-compiler => run-staging}/i3947b.check (100%) rename tests/{run-with-compiler => run-staging}/i3947b.scala (100%) rename tests/{run-with-compiler => run-staging}/i3947b2.check (100%) rename tests/{run-with-compiler => run-staging}/i3947b2.scala (100%) rename tests/{run-with-compiler => run-staging}/i3947b3.check (100%) rename tests/{run-with-compiler => run-staging}/i3947b3.scala (100%) rename tests/{run-with-compiler => run-staging}/i3947c.check (100%) rename tests/{run-with-compiler => run-staging}/i3947c.scala (100%) rename tests/{run-with-compiler => run-staging}/i3947d.check (100%) rename tests/{run-with-compiler => run-staging}/i3947d.scala (100%) rename tests/{run-with-compiler => run-staging}/i3947d2.check (100%) rename tests/{run-with-compiler => run-staging}/i3947d2.scala (100%) rename tests/{run-with-compiler => run-staging}/i3947e.check (100%) rename tests/{run-with-compiler => run-staging}/i3947e.scala (100%) rename tests/{run-with-compiler => run-staging}/i3947f.check (100%) rename tests/{run-with-compiler => run-staging}/i3947f.scala (100%) rename tests/{run-with-compiler => run-staging}/i3947g.check (100%) rename tests/{run-with-compiler => run-staging}/i3947g.scala (100%) rename tests/{run-with-compiler => run-staging}/i3947i.check (100%) rename tests/{run-with-compiler => run-staging}/i3947i.scala (100%) rename tests/{run-with-compiler => run-staging}/i3947j.check (100%) rename tests/{run-with-compiler => run-staging}/i3947j.scala (100%) rename tests/{run-with-compiler => run-staging}/i4044a.check (100%) rename tests/{run-with-compiler => run-staging}/i4044a.scala (100%) rename tests/{run-with-compiler => run-staging}/i4044b.check (100%) rename tests/{run-with-compiler => run-staging}/i4044b.scala (100%) rename tests/{run-with-compiler => run-staging}/i4044c.check (100%) rename tests/{run-with-compiler => run-staging}/i4044c.scala (100%) rename tests/{run-with-compiler => run-staging}/i4044d.check (100%) rename tests/{run-with-compiler => run-staging}/i4044d.scala (100%) rename tests/{run-with-compiler => run-staging}/i4044e.check (100%) rename tests/{run-with-compiler => run-staging}/i4044e.scala (100%) rename tests/{run-with-compiler => run-staging}/i4044f.check (100%) rename tests/{run-with-compiler => run-staging}/i4044f.scala (100%) rename tests/{run-with-compiler => run-staging}/i4350.check (100%) rename tests/{run-with-compiler => run-staging}/i4350.scala (100%) rename tests/{run-with-compiler => run-staging}/i4591.check (100%) rename tests/{run-with-compiler => run-staging}/i4591.scala (100%) rename tests/{run-with-compiler => run-staging}/i4730.scala (88%) rename tests/{run-with-compiler => run-staging}/i5144.check (100%) rename tests/{run-with-compiler => run-staging}/i5144.scala (100%) rename tests/{run-with-compiler => run-staging}/i5144b.check (100%) rename tests/{run-with-compiler => run-staging}/i5144b.scala (100%) rename tests/{run-with-compiler => run-staging}/i5152.check (100%) rename tests/{run-with-compiler => run-staging}/i5152.scala (100%) rename tests/{run-with-compiler => run-staging}/i5161.check (100%) rename tests/{run-with-compiler => run-staging}/i5161.scala (100%) rename tests/{run-with-compiler => run-staging}/i5161b.check (100%) rename tests/{run-with-compiler => run-staging}/i5161b.scala (100%) rename tests/{run-with-compiler => run-staging}/i5247.check (100%) rename tests/{run-with-compiler => run-staging}/i5247.scala (100%) rename tests/{run-with-compiler => run-staging}/i5376.check (100%) rename tests/{run-with-compiler => run-staging}/i5376.scala (100%) rename tests/{run-with-compiler => run-staging}/i5434.check (100%) rename tests/{run-with-compiler => run-staging}/i5434.scala (100%) rename tests/{run-with-compiler => run-staging}/i5965.check (100%) rename tests/{run-with-compiler => run-staging}/i5965.scala (100%) rename tests/{run-with-compiler => run-staging}/i5965b.check (100%) rename tests/{run-with-compiler => run-staging}/i5965b.scala (100%) rename tests/{run-with-compiler => run-staging}/i5997.check (100%) rename tests/{run-with-compiler => run-staging}/i5997.scala (100%) rename tests/{run-with-compiler => run-staging}/i6263.scala (100%) rename tests/{run-with-compiler => run-staging}/i6281.scala (100%) rename tests/{run-with-compiler => run-staging}/i6754.check (100%) rename tests/{run-with-compiler => run-staging}/i6754.scala (84%) rename tests/{run-macros => run-staging}/i6992/Macro_1.scala (89%) rename tests/{run-macros => run-staging}/i6992/Test_2.scala (100%) rename tests/{run-with-compiler => run-staging}/inline-quote.check (100%) rename tests/{run-with-compiler => run-staging}/inline-quote.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-ackermann-1.check (100%) rename tests/{run-with-compiler => run-staging}/quote-ackermann-1.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-compile-constants.check (100%) rename tests/{run-with-compiler => run-staging}/quote-fun-app-1.check (100%) rename tests/{run-with-compiler => run-staging}/quote-fun-app-1.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-function-applied-to.check (100%) rename tests/{run-with-compiler => run-staging}/quote-function-applied-to.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-lambda.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-lib.check (100%) rename tests/{run-with-compiler => run-staging}/quote-lib.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-lift-Array.check (100%) rename tests/{run-with-compiler => run-staging}/quote-lift-Array.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-lift-BigDecimal.check (100%) rename tests/{run-with-compiler => run-staging}/quote-lift-BigDecimal.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-lift-BigInt.check (100%) rename tests/{run-with-compiler => run-staging}/quote-lift-BigInt.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-lift-IArray.check (100%) rename tests/{run-with-compiler => run-staging}/quote-lift-IArray.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-macro-in-splice.check (100%) rename tests/{run-with-compiler => run-staging}/quote-macro-in-splice/quoted_1.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-macro-in-splice/quoted_2.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-matcher-type-bind.check (100%) rename tests/{run-with-compiler => run-staging}/quote-nested-1.check (100%) rename tests/{run-with-compiler => run-staging}/quote-nested-1.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-nested-2.check (100%) rename tests/{run-with-compiler => run-staging}/quote-nested-2.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-nested-3.check (100%) rename tests/{run-with-compiler => run-staging}/quote-nested-3.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-nested-4.check (100%) rename tests/{run-with-compiler => run-staging}/quote-nested-4.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-nested-5.check (100%) rename tests/{run-with-compiler => run-staging}/quote-nested-5.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-owners-2.check (100%) rename tests/{run-with-compiler => run-staging}/quote-owners-2.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-owners.check (100%) rename tests/{run-with-compiler => run-staging}/quote-owners.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-run-2.check (100%) rename tests/{run-with-compiler => run-staging}/quote-run-2.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-run-b.check (100%) rename tests/{run-with-compiler => run-staging}/quote-run-b.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-run-c.check (100%) rename tests/{run-with-compiler => run-staging}/quote-run-c.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-run-constants.check (100%) rename tests/{run-with-compiler => run-staging}/quote-run-constants.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-run-large.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-run-many.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-run-staged-interpreter.check (100%) rename tests/{run-with-compiler => run-staging}/quote-run-staged-interpreter.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-run-with-settings.check (100%) rename tests/{run-with-compiler => run-staging}/quote-run-with-settings.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-run.check (100%) rename tests/{run-with-compiler => run-staging}/quote-run.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-show-blocks.check (100%) rename tests/{run-with-compiler => run-staging}/quote-show-blocks.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-simple-hole.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-toExprOfTuple.check (100%) rename tests/{run-with-compiler => run-staging}/quote-toExprOfTuple.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-two-captured-ref.check (100%) rename tests/{run-with-compiler => run-staging}/quote-two-captured-ref.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-type-tags.check (100%) rename tests/{run-with-compiler => run-staging}/quote-type-tags.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-unrolled-foreach.check (100%) rename tests/{run-with-compiler => run-staging}/quote-unrolled-foreach.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-valueof-list.check (100%) rename tests/{run-with-compiler => run-staging}/quote-valueof-list.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-valueof.check (100%) rename tests/{run-with-compiler => run-staging}/quote-valueof.scala (100%) rename tests/{run-with-compiler => run-staging}/quote-var.check (100%) rename tests/{run-with-compiler => run-staging}/quote-var.scala (100%) rename tests/{run-with-compiler => run-staging}/shonan-hmm-simple.check (100%) rename tests/{run-with-compiler => run-staging}/shonan-hmm-simple.scala (100%) rename tests/{run-with-compiler => run-staging}/shonan-hmm.check (100%) rename tests/{run-with-compiler => run-staging}/shonan-hmm/Blas.scala (100%) rename tests/{run-with-compiler => run-staging}/shonan-hmm/Complex.scala (100%) rename tests/{run-with-compiler => run-staging}/shonan-hmm/Lifters.scala (100%) rename tests/{run-with-compiler => run-staging}/shonan-hmm/MVmult.scala (100%) rename tests/{run-with-compiler => run-staging}/shonan-hmm/PV.scala (100%) rename tests/{run-with-compiler => run-staging}/shonan-hmm/Ring.scala (100%) rename tests/{run-with-compiler => run-staging}/shonan-hmm/Test.scala (100%) rename tests/{run-with-compiler => run-staging}/shonan-hmm/UnrolledExpr.scala (100%) rename tests/{run-with-compiler => run-staging}/shonan-hmm/Vec.scala (100%) rename tests/{run-with-compiler => run-staging}/shonan-hmm/VecOp.scala (100%) rename tests/{run-with-compiler => run-staging}/shonan-hmm/VecROp.scala (100%) rename tests/{run-with-compiler => run-staging}/shonan-hmm/Vmults.scala (100%) rename tests/{run-with-compiler => run-staging}/staged-streams_1.check (100%) rename tests/{run-with-compiler => run-staging}/staged-streams_1.scala (100%) rename tests/{run-with-compiler => run-staging}/staged-tuples/StagedTuple.scala (100%) rename tests/{run-with-compiler => run-staging}/staged-tuples/Test.scala (100%) rename tests/{run-with-compiler => run-staging}/tasty-extractors-constants-2.check (100%) rename tests/{run-with-compiler => run-staging}/tasty-extractors-constants-2/quoted_1.scala (100%) rename tests/{run-with-compiler => run-staging}/tasty-extractors-constants-2/quoted_2.scala (100%) diff --git a/.drone.yml b/.drone.yml index cd4702e0bdb9..8f71a4cbcfde 100644 --- a/.drone.yml +++ b/.drone.yml @@ -40,7 +40,7 @@ steps: depends_on: [ clone ] commands: - cp -R . /tmp/2/ && cd /tmp/2/ - - ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test ;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test" + - ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test ;dotty-staging/test ;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test" - ./project/scripts/bootstrapCmdTests - name: community_build diff --git a/build.sbt b/build.sbt index b413737b86e1..e4f27b72a3ad 100644 --- a/build.sbt +++ b/build.sbt @@ -10,6 +10,7 @@ val `dotty-library-bootstrapped` = Build.`dotty-library-bootstrapped` val `dotty-library-bootstrappedJS` = Build.`dotty-library-bootstrappedJS` val `dotty-sbt-bridge` = Build.`dotty-sbt-bridge` val `dotty-sbt-bridge-tests` = Build.`dotty-sbt-bridge-tests` +val `dotty-staging` = Build.`dotty-staging` val `dotty-language-server` = Build.`dotty-language-server` val `dotty-bench` = Build.`dotty-bench` val `dotty-bench-bootstrapped` = Build.`dotty-bench-bootstrapped` diff --git a/compiler/src/dotty/tools/dotc/consumetasty/ConsumeTasty.scala b/compiler/src/dotty/tools/dotc/consumetasty/ConsumeTasty.scala index 58a495cf98f0..ede4e3c17ea6 100644 --- a/compiler/src/dotty/tools/dotc/consumetasty/ConsumeTasty.scala +++ b/compiler/src/dotty/tools/dotc/consumetasty/ConsumeTasty.scala @@ -1,12 +1,14 @@ package dotty.tools.dotc.consumetasty +import java.net.URLClassLoader + import dotty.tools.dotc import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.quoted.QuoteDriver import scala.tasty.file.TastyConsumer object ConsumeTasty { + def apply(classpath: String, classes: List[String], tastyConsumer: TastyConsumer): Unit = { if (classes.isEmpty) throw new IllegalArgumentException("Parameter classes should no be empty") @@ -16,9 +18,23 @@ object ConsumeTasty { new TastyFromClass(tastyConsumer) } - val currentClasspath = QuoteDriver.currentClasspath(getClass.getClassLoader) + val currentClasspath = getCurrentClasspath(getClass.getClassLoader) import java.io.File.{ pathSeparator => sep } val args = "-from-tasty" :: "-Yretain-trees" :: "-classpath" :: s"$classpath$sep$currentClasspath" :: classes (new Consume).process(args.toArray) } + + private def getCurrentClasspath(cl: ClassLoader): String = { + val classpath0 = System.getProperty("java.class.path") + cl match { + case cl: URLClassLoader => + // Loads the classes loaded by this class loader + // When executing `run` or `test` in sbt the classpath is not in the property java.class.path + import java.nio.file.Paths + val newClasspath = cl.getURLs.map(url => Paths.get(url.toURI).toString) + newClasspath.mkString("", java.io.File.pathSeparator, if (classpath0 == "") "" else java.io.File.pathSeparator + classpath0) + case _ => classpath0 + } + } + } diff --git a/compiler/src/dotty/tools/dotc/core/quoted/PickledQuotes.scala b/compiler/src/dotty/tools/dotc/core/quoted/PickledQuotes.scala index 75e8fdb7116d..531103ade2b9 100644 --- a/compiler/src/dotty/tools/dotc/core/quoted/PickledQuotes.scala +++ b/compiler/src/dotty/tools/dotc/core/quoted/PickledQuotes.scala @@ -14,7 +14,7 @@ import dotty.tools.dotc.core.Types._ import dotty.tools.dotc.core.tasty.TreePickler.Hole import dotty.tools.dotc.core.tasty.{PositionPickler, TastyPickler, TastyPrinter, TastyString} import dotty.tools.dotc.core.tasty.TreeUnpickler.UnpickleMode -import dotty.tools.dotc.quoted.ToolboxImpl +import dotty.tools.dotc.quoted.QuoteContext import dotty.tools.dotc.tastyreflect.ReflectionImpl import scala.internal.quoted._ @@ -38,14 +38,14 @@ object PickledQuotes { /** Transform the expression into its fully spliced Tree */ def quotedExprToTree[T](expr: quoted.Expr[T])(implicit ctx: Context): Tree = { val expr1 = expr.asInstanceOf[TastyTreeExpr[Tree]] - ToolboxImpl.checkScopeId(expr1.scopeId) + QuoteContext.checkScopeId(expr1.scopeId) healOwner(expr1.tree) } /** Transform the expression into its fully spliced TypeTree */ def quotedTypeToTree(tpe: quoted.Type[_])(implicit ctx: Context): Tree = { val tpe1 = tpe.asInstanceOf[TreeType[Tree]] - ToolboxImpl.checkScopeId(tpe1.scopeId) + QuoteContext.checkScopeId(tpe1.scopeId) healOwner(tpe1.typeTree) } diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala index 259ac00b8cce..b82a99655541 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala @@ -31,7 +31,7 @@ import scala.collection.mutable.ListBuffer import scala.collection.mutable import config.Printers.pickling import core.quoted.PickledQuotes -import dotty.tools.dotc.quoted.ToolboxImpl +import dotty.tools.dotc.quoted.QuoteContext import scala.quoted import scala.internal.quoted.{TastyTreeExpr, TreeType} @@ -1274,8 +1274,8 @@ class TreeUnpickler(reader: TastyReader, val args = until(end)(readTerm()) val splice = splices(idx) def wrap(arg: Tree) = - if (arg.isTerm) given (qctx: scala.quoted.QuoteContext) => new TastyTreeExpr(arg, ToolboxImpl.scopeId) - else new TreeType(arg, ToolboxImpl.scopeId) + if (arg.isTerm) given (qctx: scala.quoted.QuoteContext) => new TastyTreeExpr(arg, QuoteContext.scopeId) + else new TreeType(arg, QuoteContext.scopeId) val reifiedArgs = args.map(wrap) val filled = if (isType) { val quotedType = splice.asInstanceOf[Seq[Any] => quoted.Type[_]](reifiedArgs) diff --git a/compiler/src/dotty/tools/dotc/quoted/ExprCompilationUnit.scala b/compiler/src/dotty/tools/dotc/quoted/ExprCompilationUnit.scala deleted file mode 100644 index de5d7a65cb2f..000000000000 --- a/compiler/src/dotty/tools/dotc/quoted/ExprCompilationUnit.scala +++ /dev/null @@ -1,9 +0,0 @@ -package dotty.tools.dotc.quoted - -import dotty.tools.dotc.CompilationUnit -import dotty.tools.dotc.util.NoSource - -import scala.quoted._ - -/* Compilation unit containing the contents of a quoted expression */ -class ExprCompilationUnit(val exprBuilder: QuoteContext => Expr[_]) extends CompilationUnit(NoSource) diff --git a/compiler/src/dotty/tools/dotc/quoted/QuoteContext.scala b/compiler/src/dotty/tools/dotc/quoted/QuoteContext.scala index f241828453d2..975be04051cd 100644 --- a/compiler/src/dotty/tools/dotc/quoted/QuoteContext.scala +++ b/compiler/src/dotty/tools/dotc/quoted/QuoteContext.scala @@ -8,4 +8,16 @@ object QuoteContext { def apply() given Context: scala.quoted.QuoteContext = new scala.quoted.QuoteContext(ReflectionImpl(the[Context])) + type ScopeId = Int + + private[dotty] def checkScopeId(id: ScopeId) given Context: Unit = { + if (id != scopeId) + throw new scala.quoted.ScopeException("Cannot call `scala.quoted.staging.run(...)` within a macro or another `run(...)`") + } + + // TODO Explore more fine grained scope ids. + // This id can only differentiate scope extrusion from one compiler instance to another. + private[dotty] def scopeId given Context: ScopeId = + the[Context].outersIterator.toList.last.hashCode() + } diff --git a/compiler/src/dotty/tools/dotc/quoted/ToolboxImpl.scala b/compiler/src/dotty/tools/dotc/quoted/ToolboxImpl.scala deleted file mode 100644 index 17671b9d93f3..000000000000 --- a/compiler/src/dotty/tools/dotc/quoted/ToolboxImpl.scala +++ /dev/null @@ -1,46 +0,0 @@ -package dotty.tools.dotc.quoted - -import dotty.tools.dotc.core.Contexts.Context - -import scala.quoted._ - -/** Default runners for quoted expressions */ -object ToolboxImpl { - - /** Create a new instance of the toolbox using the the classloader of the application. - * - * @param appClassloader classloader of the application that generated the quotes - * @param settings toolbox settings - * @return A new instance of the toolbox - */ - def make(settings: scala.quoted.staging.Toolbox.Settings, appClassloader: ClassLoader): scala.quoted.staging.Toolbox = new scala.quoted.staging.Toolbox { - - private[this] val driver: QuoteDriver = new QuoteDriver(appClassloader) - - private[this] var running = false - - def run[T](exprBuilder: QuoteContext => Expr[T]): T = synchronized { - try { - if (running) // detected nested run - throw new scala.quoted.staging.RunScopeException() - running = true - driver.run(exprBuilder, settings) - } finally { - running = false - } - } - } - - type ScopeId = Int - - private[dotty] def checkScopeId(id: ScopeId) given Context: Unit = { - if (id != scopeId) - throw new scala.quoted.staging.RunScopeException - } - - // TODO Explore more fine grained scope ids. - // This id can only differentiate scope extrusion from one compiler instance to another. - private[dotty] def scopeId given Context: ScopeId = - the[Context].outersIterator.toList.last.hashCode() - -} diff --git a/compiler/src/dotty/tools/dotc/transform/Splicer.scala b/compiler/src/dotty/tools/dotc/transform/Splicer.scala index 1fffeaaad92f..65093b128a3b 100644 --- a/compiler/src/dotty/tools/dotc/transform/Splicer.scala +++ b/compiler/src/dotty/tools/dotc/transform/Splicer.scala @@ -25,7 +25,7 @@ import dotty.tools.repl.AbstractFileClassLoader import scala.reflect.ClassTag -import dotty.tools.dotc.quoted.{QuoteContext, ToolboxImpl} +import dotty.tools.dotc.quoted.QuoteContext /** Utility class to splice quoted expressions */ object Splicer { @@ -251,10 +251,10 @@ object Splicer { } private def interpretQuote(tree: Tree)(implicit env: Env): Object = - new scala.internal.quoted.TastyTreeExpr(Inlined(EmptyTree, Nil, tree).withSpan(tree.span), ToolboxImpl.scopeId) + new scala.internal.quoted.TastyTreeExpr(Inlined(EmptyTree, Nil, tree).withSpan(tree.span), QuoteContext.scopeId) private def interpretTypeQuote(tree: Tree)(implicit env: Env): Object = - new scala.internal.quoted.TreeType(tree, ToolboxImpl.scopeId) + new scala.internal.quoted.TreeType(tree, QuoteContext.scopeId) private def interpretLiteral(value: Any)(implicit env: Env): Object = value.asInstanceOf[Object] diff --git a/compiler/test/dotty/Properties.scala b/compiler/test/dotty/Properties.scala index 55a5f466fb1d..f0a1ab2b8f94 100644 --- a/compiler/test/dotty/Properties.scala +++ b/compiler/test/dotty/Properties.scala @@ -50,6 +50,9 @@ object Properties { /** dotty-compiler jar */ def dottyCompiler: String = sys.props("dotty.tests.classes.dottyCompiler") + /** dotty-staging jar */ + def dottyStaging: String = sys.props("dotty.tests.classes.dottyStaging") + /** compiler-interface jar */ def compilerInterface: String = sys.props("dotty.tests.classes.compilerInterface") diff --git a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala index 5feb6482b871..8fdefbb7464a 100644 --- a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala @@ -39,6 +39,7 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting { implicit val testGroup: TestGroup = TestGroup("compilePosWithCompiler") aggregateTests( compileFilesInDir("tests/pos-with-compiler", withCompilerOptions), + compileFilesInDir("tests/pos-staging", withStagingOptions), compileDir("compiler/src/dotty/tools/dotc/ast", withCompilerOptions), compileDir("compiler/src/dotty/tools/dotc/config", withCompilerOptions), compileDir("compiler/src/dotty/tools/dotc/core", withCompilerOptions), @@ -103,7 +104,10 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting { @Test def negWithCompiler: Unit = { implicit val testGroup: TestGroup = TestGroup("compileNegWithCompiler") - compileFilesInDir("tests/neg-with-compiler", withCompilerOptions).checkExpectedErrors() + aggregateTests( + compileFilesInDir("tests/neg-with-compiler", withCompilerOptions), + compileFilesInDir("tests/neg-staging", withStagingOptions), + ).checkExpectedErrors() } // Run tests ----------------------------------------------------------------- @@ -120,6 +124,7 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting { implicit val testGroup: TestGroup = TestGroup("runWithCompiler") aggregateTests( compileFilesInDir("tests/run-with-compiler", withCompilerOptions), + compileFilesInDir("tests/run-staging", withStagingOptions), compileDir("tests/run-with-compiler-custom-args/tasty-interpreter", withCompilerOptions) ).checkRuns() } diff --git a/compiler/test/dotty/tools/repl/ReplTest.scala b/compiler/test/dotty/tools/repl/ReplTest.scala index 5a59de3e4ad5..ef740004756f 100644 --- a/compiler/test/dotty/tools/repl/ReplTest.scala +++ b/compiler/test/dotty/tools/repl/ReplTest.scala @@ -14,11 +14,11 @@ import org.junit.{After, Before} import org.junit.Assert._ -class ReplTest(withCompiler: Boolean = false, out: ByteArrayOutputStream = new ByteArrayOutputStream) extends ReplDriver( +class ReplTest(withStaging: Boolean = false, out: ByteArrayOutputStream = new ByteArrayOutputStream) extends ReplDriver( Array( "-classpath", - if (withCompiler) - TestConfiguration.withCompilerClasspath + if (withStaging) + TestConfiguration.withStagingClasspath else TestConfiguration.basicClasspath, "-color:never"), diff --git a/compiler/test/dotty/tools/vulpix/TestConfiguration.scala b/compiler/test/dotty/tools/vulpix/TestConfiguration.scala index 453ddc5bb895..6da55fb1e492 100644 --- a/compiler/test/dotty/tools/vulpix/TestConfiguration.scala +++ b/compiler/test/dotty/tools/vulpix/TestConfiguration.scala @@ -35,6 +35,18 @@ object TestConfiguration { Properties.dottyCompiler )) + val withStagingClasspath = mkClasspath(List( + Properties.scalaLibrary, + Properties.scalaAsm, + Properties.jlineTerminal, + Properties.jlineReader, + Properties.compilerInterface, + Properties.dottyInterfaces, + Properties.dottyLibrary, + Properties.dottyStaging, + Properties.dottyCompiler + )) + def mkClasspath(classpaths: List[String]): String = classpaths.map({ p => val file = new java.io.File(p) @@ -48,6 +60,8 @@ object TestConfiguration { val defaultOptions = TestFlags(basicClasspath, commonOptions) val withCompilerOptions = defaultOptions.withClasspath(withCompilerClasspath).withRunClasspath(withCompilerClasspath) + val withStagingOptions = + defaultOptions.withClasspath(withStagingClasspath).withRunClasspath(withStagingClasspath) val allowDeepSubtypes = defaultOptions without "-Yno-deep-subtypes" val allowDoubleBindings = defaultOptions without "-Yno-double-bindings" val picklingOptions = defaultOptions and ( diff --git a/dist/bin/common b/dist/bin/common index e039bc369714..085b0f386300 100755 --- a/dist/bin/common +++ b/dist/bin/common @@ -107,6 +107,7 @@ find_lib () { DOTTY_COMP=$(find_lib "*dotty-compiler*") DOTTY_INTF=$(find_lib "*dotty-interfaces*") DOTTY_LIB=$(find_lib "*dotty-library*") +DOTTY_STAGING=$(find_lib "*dotty-staging*") SCALA_ASM=$(find_lib "*scala-asm*") SCALA_LIB=$(find_lib "*scala-library*") SBT_INTF=$(find_lib "*compiler-interface*") diff --git a/dist/bin/dotr b/dist/bin/dotr index 800eae98c10b..0dd677bb48ee 100755 --- a/dist/bin/dotr +++ b/dist/bin/dotr @@ -102,7 +102,7 @@ elif [ $execute_repl == true ] || [ ${#residual_args[@]} -ne 0 ]; then echo "warning: multiple classpaths are found, dotr only use the last one." fi if [ $with_compiler == true ]; then - cp_arg+="$PSEP$DOTTY_COMP$PSEP$DOTTY_INTF$PSEP$SCALA_ASM" + cp_arg+="$PSEP$DOTTY_COMP$PSEP$DOTTY_INTF$PSEP$SCALA_ASM$DOTTY_STAGING" fi eval exec "\"$JAVACMD\"" "$DEBUG" "-classpath \"$cp_arg\"" "${jvm_options[@]}" "${residual_args[@]}" else diff --git a/library/src-non-bootstrapped/scala/quoted/package.scala b/library/src-non-bootstrapped/scala/quoted/package.scala deleted file mode 100644 index b42a7e7c36f7..000000000000 --- a/library/src-non-bootstrapped/scala/quoted/package.scala +++ /dev/null @@ -1,51 +0,0 @@ -package scala - -package object quoted { - - object autolift { - given autoToExpr[T] as Conversion[T, Expr[T]] given Liftable[T], QuoteContext = _.toExpr - } - - implicit object ExprOps { - def (x: T) toExpr[T: Liftable] given QuoteContext: Expr[T] = the[Liftable[T]].toExpr(x) - - /** Lifts this sequence of expressions into an expression of a sequence - * - * Transforms a sequence of expression - * `Seq(e1, e2, ...)` where `ei: Expr[T]` - * to an expression equivalent to - * `'{ Seq($e1, $e2, ...) }` typed as an `Expr[Seq[T]]` - * - * Usage: - * ```scala - * '{ List(${List(1, 2, 3).toExprOfSeq}: _*) } // equvalent to '{ List(1, 2, 3) } - * ``` - */ - def (seq: Seq[Expr[T]]) toExprOfSeq[T] given (tp: Type[T], qctx: QuoteContext): Expr[Seq[T]] = { - import qctx.tasty._ - Repeated(seq.map(_.unseal).toList, tp.unseal).seal.asInstanceOf[Expr[Seq[T]]] - } - - /** Lifts this list of expressions into an expression of a list - * - * Transforms a list of expression - * `List(e1, e2, ...)` where `ei: Expr[T]` - * to an expression equivalent to - * `'{ List($e1, $e2, ...) }` typed as an `Expr[List[T]]` - */ - def (list: List[Expr[T]]) toExprOfList[T] given Type[T], QuoteContext: Expr[List[T]] = - throw new Exception("running on non bootstrapped library") - - /** Lifts this sequence of expressions into an expression of a tuple - * - * Transforms a sequence of expression - * `Seq(e1, e2, ...)` where `ei: Expr[_]` - * to an expression equivalent to - * `'{ ($e1, $e2, ...) }` typed as an `Expr[Tuple]` - */ - def (seq: Seq[Expr[_]]) toExprOfTuple given QuoteContext: Expr[Tuple] = - throw new Exception("running on non bootstrapped library") - - } - -} diff --git a/library/src/scala/quoted/Expr.scala b/library/src/scala/quoted/Expr.scala index 9c559a44bb72..0bc9d5b0a60b 100644 --- a/library/src/scala/quoted/Expr.scala +++ b/library/src/scala/quoted/Expr.scala @@ -3,17 +3,9 @@ package scala package quoted { import scala.quoted.show.SyntaxHighlight - import scala.quoted.staging.Toolbox sealed trait Expr[+T] { - /** Evaluate the contents of this expression and return the result. - * - * May throw a FreeVariableError on expressions that came from a macro. - */ - @deprecated("Use scala.quoted.run", "") - final def run(implicit toolbox: Toolbox): T = toolbox.run(_ => this) - /** Show a source code like representation of this expression without syntax highlight */ def show(implicit qctx: QuoteContext): String = qctx.show(this, SyntaxHighlight.plain) diff --git a/library/src/scala/quoted/ScopeException.scala b/library/src/scala/quoted/ScopeException.scala new file mode 100644 index 000000000000..af411bdaac13 --- /dev/null +++ b/library/src/scala/quoted/ScopeException.scala @@ -0,0 +1,3 @@ +package scala.quoted + +class ScopeException(msg: String) extends Exception(msg) diff --git a/library/src/scala/quoted/staging/RunScopeException.scala b/library/src/scala/quoted/staging/RunScopeException.scala deleted file mode 100644 index e1a93cf7c508..000000000000 --- a/library/src/scala/quoted/staging/RunScopeException.scala +++ /dev/null @@ -1,3 +0,0 @@ -package scala.quoted.staging - -class RunScopeException extends Exception("Cannot call `scala.quoted.staging.run(...)` within a macro or another `run(...)`") diff --git a/library/src/scala/quoted/staging/ToolboxNotFoundException.scala b/library/src/scala/quoted/staging/ToolboxNotFoundException.scala deleted file mode 100644 index 215f942dd72b..000000000000 --- a/library/src/scala/quoted/staging/ToolboxNotFoundException.scala +++ /dev/null @@ -1,3 +0,0 @@ -package scala.quoted.staging - -class ToolboxNotFoundException(msg: String, cause: ClassNotFoundException) extends Exception(msg, cause) diff --git a/project/Build.scala b/project/Build.scala index e3cbbe75a847..4cd8fb48e5bf 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -376,10 +376,7 @@ object Build { // This file is used by GitHub Pages when the page is available in a custom domain IO.write(file("./docs/_site/CNAME"), "dotty.epfl.ch") - val sources = unmanagedSources.in(mode match { - case NonBootstrapped => `dotty-library` - case Bootstrapped => `dotty-library-bootstrapped` - }, Compile).value + val sources = unmanagedSources.in(dottyLibrary, Compile).value val args = Seq( "-siteroot", "docs", "-project", "Dotty", @@ -520,6 +517,7 @@ object Build { "-Ddotty.tests.classes.dottyInterfaces=" + jars("dotty-interfaces"), "-Ddotty.tests.classes.dottyLibrary=" + jars("dotty-library"), "-Ddotty.tests.classes.dottyCompiler=" + jars("dotty-compiler"), + "-Ddotty.tests.classes.dottyStaging=" + jars("dotty-staging"), "-Ddotty.tests.classes.compilerInterface=" + findArtifactPath(externalDeps, "compiler-interface"), "-Ddotty.tests.classes.scalaLibrary=" + findArtifactPath(externalDeps, "scala-library"), "-Ddotty.tests.classes.scalaAsm=" + findArtifactPath(externalDeps, "scala-asm"), @@ -632,6 +630,7 @@ object Build { val scalaLib = findArtifactPath(externalDeps, "scala-library") val dottyLib = jars("dotty-library") val dottyCompiler = jars("dotty-compiler") + val dottyStaging = jars("dotty-staging") val args0: List[String] = spaceDelimited("").parsed.toList val decompile = args0.contains("-decompile") val printTasty = args0.contains("-print-tasty") @@ -656,7 +655,7 @@ object Build { } val dottyInterfaces = jars("dotty-interfaces") val asm = findArtifactPath(externalDeps, "scala-asm") - extraClasspath ++= Seq(dottyCompiler, dottyInterfaces, asm) + extraClasspath ++= Seq(dottyCompiler, dottyInterfaces, asm, dottyStaging) } val fullArgs = main :: insertClasspathInArgs(args, extraClasspath.mkString(File.pathSeparator)) @@ -682,7 +681,8 @@ object Build { // running the compiler, we should always have the bootstrapped // library on the compiler classpath since the non-bootstrapped one // may not be binary-compatible. - "dotty-library" -> packageBin.in(`dotty-library-bootstrapped`, Compile).value + "dotty-library" -> packageBin.in(`dotty-library-bootstrapped`, Compile).value, + "dotty-staging" -> packageBin.in(LocalProject("dotty-staging"), Compile).value, ).mapValues(_.getAbsolutePath) } }.value, @@ -699,7 +699,8 @@ object Build { lazy val bootstrapedDottyCompilerSettings = commonDottyCompilerSettings ++ Seq( packageAll := { packageAll.in(`dotty-compiler`).value ++ Seq( - "dotty-compiler" -> packageBin.in(Compile).value.getAbsolutePath + "dotty-compiler" -> packageBin.in(Compile).value.getAbsolutePath, + "dotty-staging" -> packageBin.in(LocalProject("dotty-staging"), Compile).value.getAbsolutePath, ) } ) @@ -746,6 +747,31 @@ object Build { (unmanagedSourceDirectories in (`dotty-library-bootstrapped`, Compile)).value, ) + lazy val `dotty-staging` = project.in(file("staging")). + withCommonSettings(Bootstrapped). + dependsOn(dottyCompiler(Bootstrapped)). + dependsOn(dottyCompiler(Bootstrapped) % "test->test"). + settings(commonBootstrappedSettings). + settings( + fork in run := true, + fork in Test := true, + javaOptions ++= { + val externalDeps = externalCompilerClasspathTask.value + val jars = packageAll.in(`dotty-compiler-bootstrapped`).value + List( + "-Ddotty.tests.classes.dottyInterfaces=" + jars("dotty-interfaces"), + "-Ddotty.tests.classes.dottyLibrary=" + jars("dotty-library"), + "-Ddotty.tests.classes.dottyCompiler=" + jars("dotty-compiler"), + "-Ddotty.tests.classes.dottyStaging=" + jars("dotty-staging"), + "-Ddotty.tests.classes.compilerInterface=" + findArtifactPath(externalDeps, "compiler-interface"), + "-Ddotty.tests.classes.scalaLibrary=" + findArtifactPath(externalDeps, "scala-library"), + "-Ddotty.tests.classes.scalaAsm=" + findArtifactPath(externalDeps, "scala-asm"), + "-Ddotty.tests.classes.jlineTerminal=" + findArtifactPath(externalDeps, "jline-terminal"), + "-Ddotty.tests.classes.jlineReader=" + findArtifactPath(externalDeps, "jline-reader") + ) + } + ) + lazy val `dotty-sbt-bridge` = project.in(file("sbt-bridge/src")). // We cannot depend on any bootstrapped project to compile the bridge, since the // bridge is needed to compile these projects. @@ -1012,6 +1038,7 @@ object Build { publishLocal in `dotty-interfaces`, publishLocal in `dotty-compiler-bootstrapped`, publishLocal in `dotty-library-bootstrapped`, + publishLocal in `dotty-staging`, publishLocal in `scala-library`, publishLocal in `scala-reflect`, publishLocal in `dotty-doc-bootstrapped`, @@ -1225,7 +1252,7 @@ object Build { // FIXME: we do not aggregate `bin` because its tests delete jars, thus breaking other tests def asDottyRoot(implicit mode: Mode): Project = project.withCommonSettings. aggregate(`dotty-interfaces`, dottyLibrary, dottyCompiler, dottyDoc, `dotty-sbt-bridge`). - bootstrappedAggregate(`scala-library`, `scala-compiler`, `scala-reflect`, scalap, `dotty-language-server`). + bootstrappedAggregate(`scala-library`, `scala-compiler`, `scala-reflect`, scalap, `dotty-language-server`, `dotty-staging`). dependsOn(dottyCompiler). dependsOn(dottyLibrary). nonBootstrappedSettings( diff --git a/project/Modes.scala b/project/Modes.scala index 86059d67299f..eddb5a3f1a7b 100644 --- a/project/Modes.scala +++ b/project/Modes.scala @@ -21,5 +21,9 @@ object Modes { def bootstrappedAggregate(s: ProjectReference*)(implicit mode: Mode): Project = if (mode == NonBootstrapped) project else project.aggregate(s: _*) + /** Depends only if the mode is bootstrapped */ + def bootstrappedDependsOn(s: sbt.ClasspathDep[ProjectReference]*)(implicit mode: Mode): Project = + if (mode == NonBootstrapped) project else project.dependsOn(s: _*) + } } diff --git a/project/scripts/bootstrapCmdTests b/project/scripts/bootstrapCmdTests index d87dc562a892..41efb06d958a 100755 --- a/project/scripts/bootstrapCmdTests +++ b/project/scripts/bootstrapCmdTests @@ -9,7 +9,7 @@ source $(dirname $0)/cmdTestsCommon.inc.sh "$SBT" "dotty-bench-bootstrapped/jmh:run 1 1 -with-compiler compiler/src/dotty/tools/dotc/core/Types.scala" echo "testing scala.quoted.Expr.run from sbt dotr" -"$SBT" ";dotty-compiler-bootstrapped/dotc tests/run-with-compiler/quote-run.scala; dotty-compiler-bootstrapped/dotr -with-compiler Test" > "$tmp" +"$SBT" ";dotty-compiler-bootstrapped/dotc tests/run-staging/quote-run.scala; dotty-compiler-bootstrapped/dotr -with-compiler Test" > "$tmp" grep -qe "val a: scala.Int = 3" "$tmp" diff --git a/sbt-dotty/sbt-test/sbt-dotty/quoted-example-project/build.sbt b/sbt-dotty/sbt-test/sbt-dotty/quoted-example-project/build.sbt index 1305c503f3be..5021215a4ac0 100644 --- a/sbt-dotty/sbt-test/sbt-dotty/quoted-example-project/build.sbt +++ b/sbt-dotty/sbt-test/sbt-dotty/quoted-example-project/build.sbt @@ -1,7 +1,6 @@ scalaVersion := sys.props("plugin.scalaVersion") libraryDependencies ++= Seq( - "ch.epfl.lamp" %% "dotty-compiler" % scalaVersion.value, - "ch.epfl.lamp" %% "dotty-compiler" % scalaVersion.value % "test->runtime", + "ch.epfl.lamp" %% "dotty-staging" % scalaVersion.value, "com.novocode" % "junit-interface" % "0.11" % "test" ) diff --git a/staging/src/scala/quoted/staging/ExprCompilationUnit.scala b/staging/src/scala/quoted/staging/ExprCompilationUnit.scala new file mode 100644 index 000000000000..39f650f11ce1 --- /dev/null +++ b/staging/src/scala/quoted/staging/ExprCompilationUnit.scala @@ -0,0 +1,8 @@ +package scala.quoted +package staging + +import dotty.tools.dotc.CompilationUnit +import dotty.tools.dotc.util.NoSource + +/** Compilation unit containing the contents of a quoted expression */ +private class ExprCompilationUnit(val exprBuilder: QuoteContext => Expr[_]) extends CompilationUnit(NoSource) diff --git a/compiler/src/dotty/tools/dotc/quoted/QuoteCompiler.scala b/staging/src/scala/quoted/staging/QuoteCompiler.scala similarity index 96% rename from compiler/src/dotty/tools/dotc/quoted/QuoteCompiler.scala rename to staging/src/scala/quoted/staging/QuoteCompiler.scala index 3fe8488e15ab..21fd2c1ef180 100644 --- a/compiler/src/dotty/tools/dotc/quoted/QuoteCompiler.scala +++ b/staging/src/scala/quoted/staging/QuoteCompiler.scala @@ -1,7 +1,8 @@ -package dotty.tools -package dotc -package quoted +package scala.quoted +package staging +import dotty.tools.unsupported +import dotty.tools.dotc._ import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.core.Contexts.Context import dotty.tools.dotc.core.Decorators._ @@ -27,7 +28,7 @@ import scala.quoted.{Expr, QuoteContext, Type} /** Compiler that takes the contents of a quoted expression `expr` and produces * a class file with `class ' { def apply: Object = expr }`. */ -class QuoteCompiler extends Compiler { +private class QuoteCompiler extends Compiler { /** Either `Left` with name of the classfile generated or `Right` with the value contained in the expression */ private[this] var result: Either[String, Any] = null diff --git a/compiler/src/dotty/tools/dotc/quoted/QuoteDriver.scala b/staging/src/scala/quoted/staging/QuoteDriver.scala similarity index 88% rename from compiler/src/dotty/tools/dotc/quoted/QuoteDriver.scala rename to staging/src/scala/quoted/staging/QuoteDriver.scala index c4d29d421351..1e426a2ac988 100644 --- a/compiler/src/dotty/tools/dotc/quoted/QuoteDriver.scala +++ b/staging/src/scala/quoted/staging/QuoteDriver.scala @@ -1,4 +1,5 @@ -package dotty.tools.dotc.quoted +package scala.quoted +package staging import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.Driver @@ -12,10 +13,10 @@ import scala.quoted.staging.Toolbox import java.net.URLClassLoader /** Driver to compile quoted code - * - * @param appClassloader classloader of the application that generated the quotes - */ -class QuoteDriver(appClassloader: ClassLoader) extends Driver { + * + * @param appClassloader classloader of the application that generated the quotes + */ +private class QuoteDriver(appClassloader: ClassLoader) extends Driver { import tpd._ private[this] val contextBase: ContextBase = new ContextBase @@ -52,7 +53,7 @@ class QuoteDriver(appClassloader: ClassLoader) extends Driver { override def initCtx: Context = { val ictx = contextBase.initialCtx - ictx.settings.classpath.update(QuoteDriver.currentClasspath(appClassloader))(ictx) + ictx.settings.classpath.update(getCurrentClasspath(appClassloader))(ictx) ictx } @@ -62,11 +63,8 @@ class QuoteDriver(appClassloader: ClassLoader) extends Driver { // Setting the throwing reporter however will report any exception ctx.setReporter(new ThrowingReporter(ctx.reporter)) } -} - -object QuoteDriver { - def currentClasspath(cl: ClassLoader): String = { + private def getCurrentClasspath(cl: ClassLoader): String = { val classpath0 = System.getProperty("java.class.path") cl match { case cl: URLClassLoader => diff --git a/library/src/scala/quoted/staging/Toolbox.scala b/staging/src/scala/quoted/staging/Toolbox.scala similarity index 60% rename from library/src/scala/quoted/staging/Toolbox.scala rename to staging/src/scala/quoted/staging/Toolbox.scala index 261eaf83643a..350f2ad8666a 100644 --- a/library/src/scala/quoted/staging/Toolbox.scala +++ b/staging/src/scala/quoted/staging/Toolbox.scala @@ -11,29 +11,32 @@ trait Toolbox { object Toolbox { /** Create a new instance of the toolbox using the the classloader of the application. - * - * Usuage: - * ``` - * import scala.quoted.staging._ - * delegate for Toolbox = Toolbox.make(getClass.getClassLoader) - * ``` - * - * @param appClassloader classloader of the application that generated the quotes - * @param settings toolbox settings - * @return A new instance of the toolbox - */ - def make(appClassloader: ClassLoader)(implicit settings: Settings): Toolbox = { - try { - val toolboxImplCls = appClassloader.loadClass("dotty.tools.dotc.quoted.ToolboxImpl") - val makeMeth = toolboxImplCls.getMethod("make", classOf[Settings], classOf[ClassLoader]) - makeMeth.invoke(null, settings, appClassloader).asInstanceOf[Toolbox] - } - catch { - case ex: ClassNotFoundException => - throw new ToolboxNotFoundException( - s"""Could not load the Toolbox class `${ex.getMessage}` from the JVM classpath. Make sure that the compiler is on the JVM classpath.""", - ex - ) + * + * Usuage: + * ``` + * import scala.quoted.staging._ + * delegate for Toolbox = Toolbox.make(getClass.getClassLoader) + * ``` + * + * @param appClassloader classloader of the application that generated the quotes + * @param settings toolbox settings + * @return A new instance of the toolbox + */ + def make(appClassloader: ClassLoader)(implicit settings: Settings): Toolbox = new Toolbox { + + private[this] val driver: QuoteDriver = new QuoteDriver(appClassloader) + + private[this] var running = false + + def run[T](exprBuilder: QuoteContext => Expr[T]): T = synchronized { + try { + if (running) // detected nested run + throw new ScopeException("Cannot call `scala.quoted.staging.run(...)` within a another `run(...)`") + running = true + driver.run(exprBuilder, settings) + } finally { + running = false + } } } diff --git a/library/src-bootstrapped/scala/quoted/staging/package.scala b/staging/src/scala/quoted/staging/staging.scala similarity index 90% rename from library/src-bootstrapped/scala/quoted/staging/package.scala rename to staging/src/scala/quoted/staging/staging.scala index 10572a605455..0754bb6ff8a1 100644 --- a/library/src-bootstrapped/scala/quoted/staging/package.scala +++ b/staging/src/scala/quoted/staging/staging.scala @@ -33,16 +33,15 @@ package object staging { * such as within a `run` or a `withQuoteContext`. */ def withQuoteContext[T](thunk: given QuoteContext => T) given (toolbox: Toolbox): T = { - var result: T = NoResult.asInstanceOf[T] + val noResult = new Object + var result: T = noResult.asInstanceOf[T] def dummyRun given QuoteContext: Expr[Unit] = { result = thunk Expr.unitExpr } toolbox.run(dummyRun given _) - assert(result != NoResult) // toolbox.run should have thrown an exception + assert(result != noResult) // toolbox.run should have thrown an exception result } - private object NoResult - } diff --git a/compiler/test-resources/repl-macros/i6007 b/staging/test-resources/repl-staging/i6007 similarity index 100% rename from compiler/test-resources/repl-macros/i6007 rename to staging/test-resources/repl-staging/i6007 diff --git a/compiler/test-resources/repl-macros/i6263 b/staging/test-resources/repl-staging/i6263 similarity index 100% rename from compiler/test-resources/repl-macros/i6263 rename to staging/test-resources/repl-staging/i6263 diff --git a/staging/test/scala/quoted/staging/repl/StagingScriptedReplTests.scala b/staging/test/scala/quoted/staging/repl/StagingScriptedReplTests.scala new file mode 100644 index 000000000000..4aa50a835aa6 --- /dev/null +++ b/staging/test/scala/quoted/staging/repl/StagingScriptedReplTests.scala @@ -0,0 +1,15 @@ +package scala.quoted.staging.repl + +import dotty.BootstrappedOnlyTests +import dotty.tools.repl.ReplTest +import dotty.tools.vulpix.TestConfiguration +import org.junit.Test +import org.junit.experimental.categories.Category + +/** Runs all tests contained in `staging/test-resources/repl-staging` */ +class StagingScriptedReplTests extends ReplTest(withStaging = true) { + + @Category(Array(classOf[BootstrappedOnlyTests])) + @Test def replStagingTests = scripts("/repl-staging").foreach(testFile) + +} diff --git a/tests/neg-with-compiler/i5941/macro_1.scala b/tests/neg-staging/i5941/macro_1.scala similarity index 100% rename from tests/neg-with-compiler/i5941/macro_1.scala rename to tests/neg-staging/i5941/macro_1.scala diff --git a/tests/neg-with-compiler/i5941/usage_2.scala b/tests/neg-staging/i5941/usage_2.scala similarity index 100% rename from tests/neg-with-compiler/i5941/usage_2.scala rename to tests/neg-staging/i5941/usage_2.scala diff --git a/tests/neg-with-compiler/quote-run-in-macro-1/quoted_1.scala b/tests/neg-staging/quote-run-in-macro-1/quoted_1.scala similarity index 100% rename from tests/neg-with-compiler/quote-run-in-macro-1/quoted_1.scala rename to tests/neg-staging/quote-run-in-macro-1/quoted_1.scala diff --git a/tests/neg-with-compiler/quote-run-in-macro-1/quoted_2.scala b/tests/neg-staging/quote-run-in-macro-1/quoted_2.scala similarity index 100% rename from tests/neg-with-compiler/quote-run-in-macro-1/quoted_2.scala rename to tests/neg-staging/quote-run-in-macro-1/quoted_2.scala diff --git a/tests/pos-with-compiler/quote-0.scala b/tests/pos-staging/quote-0.scala similarity index 100% rename from tests/pos-with-compiler/quote-0.scala rename to tests/pos-staging/quote-0.scala diff --git a/tests/pos-with-compiler/quote-assert/quoted_1.scala b/tests/pos-staging/quote-assert/quoted_1.scala similarity index 100% rename from tests/pos-with-compiler/quote-assert/quoted_1.scala rename to tests/pos-staging/quote-assert/quoted_1.scala diff --git a/tests/pos-with-compiler/quote-assert/quoted_2.scala b/tests/pos-staging/quote-assert/quoted_2.scala similarity index 100% rename from tests/pos-with-compiler/quote-assert/quoted_2.scala rename to tests/pos-staging/quote-assert/quoted_2.scala diff --git a/tests/run-macros/i6765/Macro_1.scala b/tests/run-macros/i6765/Macro_1.scala index f234fa289d08..251ba38760df 100644 --- a/tests/run-macros/i6765/Macro_1.scala +++ b/tests/run-macros/i6765/Macro_1.scala @@ -1,9 +1,6 @@ import scala.quoted._ -import scala.quoted.staging._ import given scala.quoted._ -given as Toolbox = Toolbox.make(getClass.getClassLoader) - inline def foo = ${fooImpl} def fooImpl given (qctx: QuoteContext) = { diff --git a/tests/run-with-compiler/quote-matcher-type-bind/Macro_1.scala b/tests/run-macros/quote-matcher-type-bind/Macro_1.scala similarity index 100% rename from tests/run-with-compiler/quote-matcher-type-bind/Macro_1.scala rename to tests/run-macros/quote-matcher-type-bind/Macro_1.scala diff --git a/tests/run-with-compiler/quote-matcher-type-bind/Test_2.scala b/tests/run-macros/quote-matcher-type-bind/Test_2.scala similarity index 100% rename from tests/run-with-compiler/quote-matcher-type-bind/Test_2.scala rename to tests/run-macros/quote-matcher-type-bind/Test_2.scala diff --git a/tests/run-with-compiler/reflect-inline/assert_1.scala b/tests/run-macros/reflect-inline/assert_1.scala similarity index 100% rename from tests/run-with-compiler/reflect-inline/assert_1.scala rename to tests/run-macros/reflect-inline/assert_1.scala diff --git a/tests/run-with-compiler/reflect-inline/test_2.scala b/tests/run-macros/reflect-inline/test_2.scala similarity index 100% rename from tests/run-with-compiler/reflect-inline/test_2.scala rename to tests/run-macros/reflect-inline/test_2.scala diff --git a/tests/run-with-compiler/i3823-b.check b/tests/run-staging/i3823-b.check similarity index 100% rename from tests/run-with-compiler/i3823-b.check rename to tests/run-staging/i3823-b.check diff --git a/tests/run-with-compiler/i3823-b.scala b/tests/run-staging/i3823-b.scala similarity index 100% rename from tests/run-with-compiler/i3823-b.scala rename to tests/run-staging/i3823-b.scala diff --git a/tests/run-with-compiler/i3823-c.check b/tests/run-staging/i3823-c.check similarity index 100% rename from tests/run-with-compiler/i3823-c.check rename to tests/run-staging/i3823-c.check diff --git a/tests/run-with-compiler/i3823-c.scala b/tests/run-staging/i3823-c.scala similarity index 100% rename from tests/run-with-compiler/i3823-c.scala rename to tests/run-staging/i3823-c.scala diff --git a/tests/run-with-compiler/i3823.check b/tests/run-staging/i3823.check similarity index 100% rename from tests/run-with-compiler/i3823.check rename to tests/run-staging/i3823.check diff --git a/tests/run-with-compiler/i3823.scala b/tests/run-staging/i3823.scala similarity index 100% rename from tests/run-with-compiler/i3823.scala rename to tests/run-staging/i3823.scala diff --git a/tests/run-with-compiler/i3847-b.check b/tests/run-staging/i3847-b.check similarity index 100% rename from tests/run-with-compiler/i3847-b.check rename to tests/run-staging/i3847-b.check diff --git a/tests/run-with-compiler/i3847-b.scala b/tests/run-staging/i3847-b.scala similarity index 100% rename from tests/run-with-compiler/i3847-b.scala rename to tests/run-staging/i3847-b.scala diff --git a/tests/run-with-compiler/i3847.check b/tests/run-staging/i3847.check similarity index 100% rename from tests/run-with-compiler/i3847.check rename to tests/run-staging/i3847.check diff --git a/tests/run-with-compiler/i3847.scala b/tests/run-staging/i3847.scala similarity index 100% rename from tests/run-with-compiler/i3847.scala rename to tests/run-staging/i3847.scala diff --git a/tests/run-with-compiler/i3876-b.check b/tests/run-staging/i3876-b.check similarity index 100% rename from tests/run-with-compiler/i3876-b.check rename to tests/run-staging/i3876-b.check diff --git a/tests/run-with-compiler/i3876-b.scala b/tests/run-staging/i3876-b.scala similarity index 100% rename from tests/run-with-compiler/i3876-b.scala rename to tests/run-staging/i3876-b.scala diff --git a/tests/run-with-compiler/i3876-c.check b/tests/run-staging/i3876-c.check similarity index 100% rename from tests/run-with-compiler/i3876-c.check rename to tests/run-staging/i3876-c.check diff --git a/tests/run-with-compiler/i3876-c.scala b/tests/run-staging/i3876-c.scala similarity index 100% rename from tests/run-with-compiler/i3876-c.scala rename to tests/run-staging/i3876-c.scala diff --git a/tests/run-with-compiler/i3876-d.check b/tests/run-staging/i3876-d.check similarity index 100% rename from tests/run-with-compiler/i3876-d.check rename to tests/run-staging/i3876-d.check diff --git a/tests/run-with-compiler/i3876-d.scala b/tests/run-staging/i3876-d.scala similarity index 100% rename from tests/run-with-compiler/i3876-d.scala rename to tests/run-staging/i3876-d.scala diff --git a/tests/run-with-compiler/i3876-e.check b/tests/run-staging/i3876-e.check similarity index 100% rename from tests/run-with-compiler/i3876-e.check rename to tests/run-staging/i3876-e.check diff --git a/tests/run-with-compiler/i3876-e.scala b/tests/run-staging/i3876-e.scala similarity index 100% rename from tests/run-with-compiler/i3876-e.scala rename to tests/run-staging/i3876-e.scala diff --git a/tests/run-with-compiler/i3876.check b/tests/run-staging/i3876.check similarity index 100% rename from tests/run-with-compiler/i3876.check rename to tests/run-staging/i3876.check diff --git a/tests/run-with-compiler/i3876.scala b/tests/run-staging/i3876.scala similarity index 100% rename from tests/run-with-compiler/i3876.scala rename to tests/run-staging/i3876.scala diff --git a/tests/run-with-compiler/i3946.check b/tests/run-staging/i3946.check similarity index 100% rename from tests/run-with-compiler/i3946.check rename to tests/run-staging/i3946.check diff --git a/tests/run-with-compiler/i3946.scala b/tests/run-staging/i3946.scala similarity index 100% rename from tests/run-with-compiler/i3946.scala rename to tests/run-staging/i3946.scala diff --git a/tests/run-with-compiler/i3947.check b/tests/run-staging/i3947.check similarity index 100% rename from tests/run-with-compiler/i3947.check rename to tests/run-staging/i3947.check diff --git a/tests/run-with-compiler/i3947.scala b/tests/run-staging/i3947.scala similarity index 100% rename from tests/run-with-compiler/i3947.scala rename to tests/run-staging/i3947.scala diff --git a/tests/run-with-compiler/i3947b.check b/tests/run-staging/i3947b.check similarity index 100% rename from tests/run-with-compiler/i3947b.check rename to tests/run-staging/i3947b.check diff --git a/tests/run-with-compiler/i3947b.scala b/tests/run-staging/i3947b.scala similarity index 100% rename from tests/run-with-compiler/i3947b.scala rename to tests/run-staging/i3947b.scala diff --git a/tests/run-with-compiler/i3947b2.check b/tests/run-staging/i3947b2.check similarity index 100% rename from tests/run-with-compiler/i3947b2.check rename to tests/run-staging/i3947b2.check diff --git a/tests/run-with-compiler/i3947b2.scala b/tests/run-staging/i3947b2.scala similarity index 100% rename from tests/run-with-compiler/i3947b2.scala rename to tests/run-staging/i3947b2.scala diff --git a/tests/run-with-compiler/i3947b3.check b/tests/run-staging/i3947b3.check similarity index 100% rename from tests/run-with-compiler/i3947b3.check rename to tests/run-staging/i3947b3.check diff --git a/tests/run-with-compiler/i3947b3.scala b/tests/run-staging/i3947b3.scala similarity index 100% rename from tests/run-with-compiler/i3947b3.scala rename to tests/run-staging/i3947b3.scala diff --git a/tests/run-with-compiler/i3947c.check b/tests/run-staging/i3947c.check similarity index 100% rename from tests/run-with-compiler/i3947c.check rename to tests/run-staging/i3947c.check diff --git a/tests/run-with-compiler/i3947c.scala b/tests/run-staging/i3947c.scala similarity index 100% rename from tests/run-with-compiler/i3947c.scala rename to tests/run-staging/i3947c.scala diff --git a/tests/run-with-compiler/i3947d.check b/tests/run-staging/i3947d.check similarity index 100% rename from tests/run-with-compiler/i3947d.check rename to tests/run-staging/i3947d.check diff --git a/tests/run-with-compiler/i3947d.scala b/tests/run-staging/i3947d.scala similarity index 100% rename from tests/run-with-compiler/i3947d.scala rename to tests/run-staging/i3947d.scala diff --git a/tests/run-with-compiler/i3947d2.check b/tests/run-staging/i3947d2.check similarity index 100% rename from tests/run-with-compiler/i3947d2.check rename to tests/run-staging/i3947d2.check diff --git a/tests/run-with-compiler/i3947d2.scala b/tests/run-staging/i3947d2.scala similarity index 100% rename from tests/run-with-compiler/i3947d2.scala rename to tests/run-staging/i3947d2.scala diff --git a/tests/run-with-compiler/i3947e.check b/tests/run-staging/i3947e.check similarity index 100% rename from tests/run-with-compiler/i3947e.check rename to tests/run-staging/i3947e.check diff --git a/tests/run-with-compiler/i3947e.scala b/tests/run-staging/i3947e.scala similarity index 100% rename from tests/run-with-compiler/i3947e.scala rename to tests/run-staging/i3947e.scala diff --git a/tests/run-with-compiler/i3947f.check b/tests/run-staging/i3947f.check similarity index 100% rename from tests/run-with-compiler/i3947f.check rename to tests/run-staging/i3947f.check diff --git a/tests/run-with-compiler/i3947f.scala b/tests/run-staging/i3947f.scala similarity index 100% rename from tests/run-with-compiler/i3947f.scala rename to tests/run-staging/i3947f.scala diff --git a/tests/run-with-compiler/i3947g.check b/tests/run-staging/i3947g.check similarity index 100% rename from tests/run-with-compiler/i3947g.check rename to tests/run-staging/i3947g.check diff --git a/tests/run-with-compiler/i3947g.scala b/tests/run-staging/i3947g.scala similarity index 100% rename from tests/run-with-compiler/i3947g.scala rename to tests/run-staging/i3947g.scala diff --git a/tests/run-with-compiler/i3947i.check b/tests/run-staging/i3947i.check similarity index 100% rename from tests/run-with-compiler/i3947i.check rename to tests/run-staging/i3947i.check diff --git a/tests/run-with-compiler/i3947i.scala b/tests/run-staging/i3947i.scala similarity index 100% rename from tests/run-with-compiler/i3947i.scala rename to tests/run-staging/i3947i.scala diff --git a/tests/run-with-compiler/i3947j.check b/tests/run-staging/i3947j.check similarity index 100% rename from tests/run-with-compiler/i3947j.check rename to tests/run-staging/i3947j.check diff --git a/tests/run-with-compiler/i3947j.scala b/tests/run-staging/i3947j.scala similarity index 100% rename from tests/run-with-compiler/i3947j.scala rename to tests/run-staging/i3947j.scala diff --git a/tests/run-with-compiler/i4044a.check b/tests/run-staging/i4044a.check similarity index 100% rename from tests/run-with-compiler/i4044a.check rename to tests/run-staging/i4044a.check diff --git a/tests/run-with-compiler/i4044a.scala b/tests/run-staging/i4044a.scala similarity index 100% rename from tests/run-with-compiler/i4044a.scala rename to tests/run-staging/i4044a.scala diff --git a/tests/run-with-compiler/i4044b.check b/tests/run-staging/i4044b.check similarity index 100% rename from tests/run-with-compiler/i4044b.check rename to tests/run-staging/i4044b.check diff --git a/tests/run-with-compiler/i4044b.scala b/tests/run-staging/i4044b.scala similarity index 100% rename from tests/run-with-compiler/i4044b.scala rename to tests/run-staging/i4044b.scala diff --git a/tests/run-with-compiler/i4044c.check b/tests/run-staging/i4044c.check similarity index 100% rename from tests/run-with-compiler/i4044c.check rename to tests/run-staging/i4044c.check diff --git a/tests/run-with-compiler/i4044c.scala b/tests/run-staging/i4044c.scala similarity index 100% rename from tests/run-with-compiler/i4044c.scala rename to tests/run-staging/i4044c.scala diff --git a/tests/run-with-compiler/i4044d.check b/tests/run-staging/i4044d.check similarity index 100% rename from tests/run-with-compiler/i4044d.check rename to tests/run-staging/i4044d.check diff --git a/tests/run-with-compiler/i4044d.scala b/tests/run-staging/i4044d.scala similarity index 100% rename from tests/run-with-compiler/i4044d.scala rename to tests/run-staging/i4044d.scala diff --git a/tests/run-with-compiler/i4044e.check b/tests/run-staging/i4044e.check similarity index 100% rename from tests/run-with-compiler/i4044e.check rename to tests/run-staging/i4044e.check diff --git a/tests/run-with-compiler/i4044e.scala b/tests/run-staging/i4044e.scala similarity index 100% rename from tests/run-with-compiler/i4044e.scala rename to tests/run-staging/i4044e.scala diff --git a/tests/run-with-compiler/i4044f.check b/tests/run-staging/i4044f.check similarity index 100% rename from tests/run-with-compiler/i4044f.check rename to tests/run-staging/i4044f.check diff --git a/tests/run-with-compiler/i4044f.scala b/tests/run-staging/i4044f.scala similarity index 100% rename from tests/run-with-compiler/i4044f.scala rename to tests/run-staging/i4044f.scala diff --git a/tests/run-with-compiler/i4350.check b/tests/run-staging/i4350.check similarity index 100% rename from tests/run-with-compiler/i4350.check rename to tests/run-staging/i4350.check diff --git a/tests/run-with-compiler/i4350.scala b/tests/run-staging/i4350.scala similarity index 100% rename from tests/run-with-compiler/i4350.scala rename to tests/run-staging/i4350.scala diff --git a/tests/run-with-compiler/i4591.check b/tests/run-staging/i4591.check similarity index 100% rename from tests/run-with-compiler/i4591.check rename to tests/run-staging/i4591.check diff --git a/tests/run-with-compiler/i4591.scala b/tests/run-staging/i4591.scala similarity index 100% rename from tests/run-with-compiler/i4591.scala rename to tests/run-staging/i4591.scala diff --git a/tests/run-with-compiler/i4730.scala b/tests/run-staging/i4730.scala similarity index 88% rename from tests/run-with-compiler/i4730.scala rename to tests/run-staging/i4730.scala index 07102d21e30e..9c27c328f9ee 100644 --- a/tests/run-with-compiler/i4730.scala +++ b/tests/run-staging/i4730.scala @@ -14,7 +14,7 @@ object Test { run(ret).apply(10) throw new Exception } catch { - case ex: scala.quoted.staging.RunScopeException => + case ex: scala.quoted.ScopeException => // ok } } diff --git a/tests/run-with-compiler/i5144.check b/tests/run-staging/i5144.check similarity index 100% rename from tests/run-with-compiler/i5144.check rename to tests/run-staging/i5144.check diff --git a/tests/run-with-compiler/i5144.scala b/tests/run-staging/i5144.scala similarity index 100% rename from tests/run-with-compiler/i5144.scala rename to tests/run-staging/i5144.scala diff --git a/tests/run-with-compiler/i5144b.check b/tests/run-staging/i5144b.check similarity index 100% rename from tests/run-with-compiler/i5144b.check rename to tests/run-staging/i5144b.check diff --git a/tests/run-with-compiler/i5144b.scala b/tests/run-staging/i5144b.scala similarity index 100% rename from tests/run-with-compiler/i5144b.scala rename to tests/run-staging/i5144b.scala diff --git a/tests/run-with-compiler/i5152.check b/tests/run-staging/i5152.check similarity index 100% rename from tests/run-with-compiler/i5152.check rename to tests/run-staging/i5152.check diff --git a/tests/run-with-compiler/i5152.scala b/tests/run-staging/i5152.scala similarity index 100% rename from tests/run-with-compiler/i5152.scala rename to tests/run-staging/i5152.scala diff --git a/tests/run-with-compiler/i5161.check b/tests/run-staging/i5161.check similarity index 100% rename from tests/run-with-compiler/i5161.check rename to tests/run-staging/i5161.check diff --git a/tests/run-with-compiler/i5161.scala b/tests/run-staging/i5161.scala similarity index 100% rename from tests/run-with-compiler/i5161.scala rename to tests/run-staging/i5161.scala diff --git a/tests/run-with-compiler/i5161b.check b/tests/run-staging/i5161b.check similarity index 100% rename from tests/run-with-compiler/i5161b.check rename to tests/run-staging/i5161b.check diff --git a/tests/run-with-compiler/i5161b.scala b/tests/run-staging/i5161b.scala similarity index 100% rename from tests/run-with-compiler/i5161b.scala rename to tests/run-staging/i5161b.scala diff --git a/tests/run-with-compiler/i5247.check b/tests/run-staging/i5247.check similarity index 100% rename from tests/run-with-compiler/i5247.check rename to tests/run-staging/i5247.check diff --git a/tests/run-with-compiler/i5247.scala b/tests/run-staging/i5247.scala similarity index 100% rename from tests/run-with-compiler/i5247.scala rename to tests/run-staging/i5247.scala diff --git a/tests/run-with-compiler/i5376.check b/tests/run-staging/i5376.check similarity index 100% rename from tests/run-with-compiler/i5376.check rename to tests/run-staging/i5376.check diff --git a/tests/run-with-compiler/i5376.scala b/tests/run-staging/i5376.scala similarity index 100% rename from tests/run-with-compiler/i5376.scala rename to tests/run-staging/i5376.scala diff --git a/tests/run-with-compiler/i5434.check b/tests/run-staging/i5434.check similarity index 100% rename from tests/run-with-compiler/i5434.check rename to tests/run-staging/i5434.check diff --git a/tests/run-with-compiler/i5434.scala b/tests/run-staging/i5434.scala similarity index 100% rename from tests/run-with-compiler/i5434.scala rename to tests/run-staging/i5434.scala diff --git a/tests/run-with-compiler/i5965.check b/tests/run-staging/i5965.check similarity index 100% rename from tests/run-with-compiler/i5965.check rename to tests/run-staging/i5965.check diff --git a/tests/run-with-compiler/i5965.scala b/tests/run-staging/i5965.scala similarity index 100% rename from tests/run-with-compiler/i5965.scala rename to tests/run-staging/i5965.scala diff --git a/tests/run-with-compiler/i5965b.check b/tests/run-staging/i5965b.check similarity index 100% rename from tests/run-with-compiler/i5965b.check rename to tests/run-staging/i5965b.check diff --git a/tests/run-with-compiler/i5965b.scala b/tests/run-staging/i5965b.scala similarity index 100% rename from tests/run-with-compiler/i5965b.scala rename to tests/run-staging/i5965b.scala diff --git a/tests/run-with-compiler/i5997.check b/tests/run-staging/i5997.check similarity index 100% rename from tests/run-with-compiler/i5997.check rename to tests/run-staging/i5997.check diff --git a/tests/run-with-compiler/i5997.scala b/tests/run-staging/i5997.scala similarity index 100% rename from tests/run-with-compiler/i5997.scala rename to tests/run-staging/i5997.scala diff --git a/tests/run-with-compiler/i6263.scala b/tests/run-staging/i6263.scala similarity index 100% rename from tests/run-with-compiler/i6263.scala rename to tests/run-staging/i6263.scala diff --git a/tests/run-with-compiler/i6281.scala b/tests/run-staging/i6281.scala similarity index 100% rename from tests/run-with-compiler/i6281.scala rename to tests/run-staging/i6281.scala diff --git a/tests/run-with-compiler/i6754.check b/tests/run-staging/i6754.check similarity index 100% rename from tests/run-with-compiler/i6754.check rename to tests/run-staging/i6754.check diff --git a/tests/run-with-compiler/i6754.scala b/tests/run-staging/i6754.scala similarity index 84% rename from tests/run-with-compiler/i6754.scala rename to tests/run-staging/i6754.scala index 5eb8bd0fdabd..4ce18d67b349 100644 --- a/tests/run-with-compiler/i6754.scala +++ b/tests/run-staging/i6754.scala @@ -16,7 +16,7 @@ object Test { throw new Exception } catch { case ex: java.lang.reflect.InvocationTargetException => - assert(ex.getTargetException.isInstanceOf[scala.quoted.staging.RunScopeException]) + assert(ex.getTargetException.isInstanceOf[scala.quoted.ScopeException]) } } } diff --git a/tests/run-macros/i6992/Macro_1.scala b/tests/run-staging/i6992/Macro_1.scala similarity index 89% rename from tests/run-macros/i6992/Macro_1.scala rename to tests/run-staging/i6992/Macro_1.scala index 6f6c1a5cbfb0..feb21a235534 100644 --- a/tests/run-macros/i6992/Macro_1.scala +++ b/tests/run-staging/i6992/Macro_1.scala @@ -17,7 +17,7 @@ object macros { case '{$x: Foo} => run(x).x.toExpr } } catch { - case _: scala.quoted.staging.RunScopeException => + case ex: scala.quoted.ScopeException => '{"OK"} } } diff --git a/tests/run-macros/i6992/Test_2.scala b/tests/run-staging/i6992/Test_2.scala similarity index 100% rename from tests/run-macros/i6992/Test_2.scala rename to tests/run-staging/i6992/Test_2.scala diff --git a/tests/run-with-compiler/inline-quote.check b/tests/run-staging/inline-quote.check similarity index 100% rename from tests/run-with-compiler/inline-quote.check rename to tests/run-staging/inline-quote.check diff --git a/tests/run-with-compiler/inline-quote.scala b/tests/run-staging/inline-quote.scala similarity index 100% rename from tests/run-with-compiler/inline-quote.scala rename to tests/run-staging/inline-quote.scala diff --git a/tests/run-with-compiler/quote-ackermann-1.check b/tests/run-staging/quote-ackermann-1.check similarity index 100% rename from tests/run-with-compiler/quote-ackermann-1.check rename to tests/run-staging/quote-ackermann-1.check diff --git a/tests/run-with-compiler/quote-ackermann-1.scala b/tests/run-staging/quote-ackermann-1.scala similarity index 100% rename from tests/run-with-compiler/quote-ackermann-1.scala rename to tests/run-staging/quote-ackermann-1.scala diff --git a/tests/run-with-compiler/quote-compile-constants.check b/tests/run-staging/quote-compile-constants.check similarity index 100% rename from tests/run-with-compiler/quote-compile-constants.check rename to tests/run-staging/quote-compile-constants.check diff --git a/tests/run-with-compiler/quote-fun-app-1.check b/tests/run-staging/quote-fun-app-1.check similarity index 100% rename from tests/run-with-compiler/quote-fun-app-1.check rename to tests/run-staging/quote-fun-app-1.check diff --git a/tests/run-with-compiler/quote-fun-app-1.scala b/tests/run-staging/quote-fun-app-1.scala similarity index 100% rename from tests/run-with-compiler/quote-fun-app-1.scala rename to tests/run-staging/quote-fun-app-1.scala diff --git a/tests/run-with-compiler/quote-function-applied-to.check b/tests/run-staging/quote-function-applied-to.check similarity index 100% rename from tests/run-with-compiler/quote-function-applied-to.check rename to tests/run-staging/quote-function-applied-to.check diff --git a/tests/run-with-compiler/quote-function-applied-to.scala b/tests/run-staging/quote-function-applied-to.scala similarity index 100% rename from tests/run-with-compiler/quote-function-applied-to.scala rename to tests/run-staging/quote-function-applied-to.scala diff --git a/tests/run-with-compiler/quote-lambda.scala b/tests/run-staging/quote-lambda.scala similarity index 100% rename from tests/run-with-compiler/quote-lambda.scala rename to tests/run-staging/quote-lambda.scala diff --git a/tests/run-with-compiler/quote-lib.check b/tests/run-staging/quote-lib.check similarity index 100% rename from tests/run-with-compiler/quote-lib.check rename to tests/run-staging/quote-lib.check diff --git a/tests/run-with-compiler/quote-lib.scala b/tests/run-staging/quote-lib.scala similarity index 100% rename from tests/run-with-compiler/quote-lib.scala rename to tests/run-staging/quote-lib.scala diff --git a/tests/run-with-compiler/quote-lift-Array.check b/tests/run-staging/quote-lift-Array.check similarity index 100% rename from tests/run-with-compiler/quote-lift-Array.check rename to tests/run-staging/quote-lift-Array.check diff --git a/tests/run-with-compiler/quote-lift-Array.scala b/tests/run-staging/quote-lift-Array.scala similarity index 100% rename from tests/run-with-compiler/quote-lift-Array.scala rename to tests/run-staging/quote-lift-Array.scala diff --git a/tests/run-with-compiler/quote-lift-BigDecimal.check b/tests/run-staging/quote-lift-BigDecimal.check similarity index 100% rename from tests/run-with-compiler/quote-lift-BigDecimal.check rename to tests/run-staging/quote-lift-BigDecimal.check diff --git a/tests/run-with-compiler/quote-lift-BigDecimal.scala b/tests/run-staging/quote-lift-BigDecimal.scala similarity index 100% rename from tests/run-with-compiler/quote-lift-BigDecimal.scala rename to tests/run-staging/quote-lift-BigDecimal.scala diff --git a/tests/run-with-compiler/quote-lift-BigInt.check b/tests/run-staging/quote-lift-BigInt.check similarity index 100% rename from tests/run-with-compiler/quote-lift-BigInt.check rename to tests/run-staging/quote-lift-BigInt.check diff --git a/tests/run-with-compiler/quote-lift-BigInt.scala b/tests/run-staging/quote-lift-BigInt.scala similarity index 100% rename from tests/run-with-compiler/quote-lift-BigInt.scala rename to tests/run-staging/quote-lift-BigInt.scala diff --git a/tests/run-with-compiler/quote-lift-IArray.check b/tests/run-staging/quote-lift-IArray.check similarity index 100% rename from tests/run-with-compiler/quote-lift-IArray.check rename to tests/run-staging/quote-lift-IArray.check diff --git a/tests/run-with-compiler/quote-lift-IArray.scala b/tests/run-staging/quote-lift-IArray.scala similarity index 100% rename from tests/run-with-compiler/quote-lift-IArray.scala rename to tests/run-staging/quote-lift-IArray.scala diff --git a/tests/run-with-compiler/quote-macro-in-splice.check b/tests/run-staging/quote-macro-in-splice.check similarity index 100% rename from tests/run-with-compiler/quote-macro-in-splice.check rename to tests/run-staging/quote-macro-in-splice.check diff --git a/tests/run-with-compiler/quote-macro-in-splice/quoted_1.scala b/tests/run-staging/quote-macro-in-splice/quoted_1.scala similarity index 100% rename from tests/run-with-compiler/quote-macro-in-splice/quoted_1.scala rename to tests/run-staging/quote-macro-in-splice/quoted_1.scala diff --git a/tests/run-with-compiler/quote-macro-in-splice/quoted_2.scala b/tests/run-staging/quote-macro-in-splice/quoted_2.scala similarity index 100% rename from tests/run-with-compiler/quote-macro-in-splice/quoted_2.scala rename to tests/run-staging/quote-macro-in-splice/quoted_2.scala diff --git a/tests/run-with-compiler/quote-matcher-type-bind.check b/tests/run-staging/quote-matcher-type-bind.check similarity index 100% rename from tests/run-with-compiler/quote-matcher-type-bind.check rename to tests/run-staging/quote-matcher-type-bind.check diff --git a/tests/run-with-compiler/quote-nested-1.check b/tests/run-staging/quote-nested-1.check similarity index 100% rename from tests/run-with-compiler/quote-nested-1.check rename to tests/run-staging/quote-nested-1.check diff --git a/tests/run-with-compiler/quote-nested-1.scala b/tests/run-staging/quote-nested-1.scala similarity index 100% rename from tests/run-with-compiler/quote-nested-1.scala rename to tests/run-staging/quote-nested-1.scala diff --git a/tests/run-with-compiler/quote-nested-2.check b/tests/run-staging/quote-nested-2.check similarity index 100% rename from tests/run-with-compiler/quote-nested-2.check rename to tests/run-staging/quote-nested-2.check diff --git a/tests/run-with-compiler/quote-nested-2.scala b/tests/run-staging/quote-nested-2.scala similarity index 100% rename from tests/run-with-compiler/quote-nested-2.scala rename to tests/run-staging/quote-nested-2.scala diff --git a/tests/run-with-compiler/quote-nested-3.check b/tests/run-staging/quote-nested-3.check similarity index 100% rename from tests/run-with-compiler/quote-nested-3.check rename to tests/run-staging/quote-nested-3.check diff --git a/tests/run-with-compiler/quote-nested-3.scala b/tests/run-staging/quote-nested-3.scala similarity index 100% rename from tests/run-with-compiler/quote-nested-3.scala rename to tests/run-staging/quote-nested-3.scala diff --git a/tests/run-with-compiler/quote-nested-4.check b/tests/run-staging/quote-nested-4.check similarity index 100% rename from tests/run-with-compiler/quote-nested-4.check rename to tests/run-staging/quote-nested-4.check diff --git a/tests/run-with-compiler/quote-nested-4.scala b/tests/run-staging/quote-nested-4.scala similarity index 100% rename from tests/run-with-compiler/quote-nested-4.scala rename to tests/run-staging/quote-nested-4.scala diff --git a/tests/run-with-compiler/quote-nested-5.check b/tests/run-staging/quote-nested-5.check similarity index 100% rename from tests/run-with-compiler/quote-nested-5.check rename to tests/run-staging/quote-nested-5.check diff --git a/tests/run-with-compiler/quote-nested-5.scala b/tests/run-staging/quote-nested-5.scala similarity index 100% rename from tests/run-with-compiler/quote-nested-5.scala rename to tests/run-staging/quote-nested-5.scala diff --git a/tests/run-with-compiler/quote-owners-2.check b/tests/run-staging/quote-owners-2.check similarity index 100% rename from tests/run-with-compiler/quote-owners-2.check rename to tests/run-staging/quote-owners-2.check diff --git a/tests/run-with-compiler/quote-owners-2.scala b/tests/run-staging/quote-owners-2.scala similarity index 100% rename from tests/run-with-compiler/quote-owners-2.scala rename to tests/run-staging/quote-owners-2.scala diff --git a/tests/run-with-compiler/quote-owners.check b/tests/run-staging/quote-owners.check similarity index 100% rename from tests/run-with-compiler/quote-owners.check rename to tests/run-staging/quote-owners.check diff --git a/tests/run-with-compiler/quote-owners.scala b/tests/run-staging/quote-owners.scala similarity index 100% rename from tests/run-with-compiler/quote-owners.scala rename to tests/run-staging/quote-owners.scala diff --git a/tests/run-with-compiler/quote-run-2.check b/tests/run-staging/quote-run-2.check similarity index 100% rename from tests/run-with-compiler/quote-run-2.check rename to tests/run-staging/quote-run-2.check diff --git a/tests/run-with-compiler/quote-run-2.scala b/tests/run-staging/quote-run-2.scala similarity index 100% rename from tests/run-with-compiler/quote-run-2.scala rename to tests/run-staging/quote-run-2.scala diff --git a/tests/run-with-compiler/quote-run-b.check b/tests/run-staging/quote-run-b.check similarity index 100% rename from tests/run-with-compiler/quote-run-b.check rename to tests/run-staging/quote-run-b.check diff --git a/tests/run-with-compiler/quote-run-b.scala b/tests/run-staging/quote-run-b.scala similarity index 100% rename from tests/run-with-compiler/quote-run-b.scala rename to tests/run-staging/quote-run-b.scala diff --git a/tests/run-with-compiler/quote-run-c.check b/tests/run-staging/quote-run-c.check similarity index 100% rename from tests/run-with-compiler/quote-run-c.check rename to tests/run-staging/quote-run-c.check diff --git a/tests/run-with-compiler/quote-run-c.scala b/tests/run-staging/quote-run-c.scala similarity index 100% rename from tests/run-with-compiler/quote-run-c.scala rename to tests/run-staging/quote-run-c.scala diff --git a/tests/run-with-compiler/quote-run-constants.check b/tests/run-staging/quote-run-constants.check similarity index 100% rename from tests/run-with-compiler/quote-run-constants.check rename to tests/run-staging/quote-run-constants.check diff --git a/tests/run-with-compiler/quote-run-constants.scala b/tests/run-staging/quote-run-constants.scala similarity index 100% rename from tests/run-with-compiler/quote-run-constants.scala rename to tests/run-staging/quote-run-constants.scala diff --git a/tests/run-with-compiler/quote-run-large.scala b/tests/run-staging/quote-run-large.scala similarity index 100% rename from tests/run-with-compiler/quote-run-large.scala rename to tests/run-staging/quote-run-large.scala diff --git a/tests/run-with-compiler/quote-run-many.scala b/tests/run-staging/quote-run-many.scala similarity index 100% rename from tests/run-with-compiler/quote-run-many.scala rename to tests/run-staging/quote-run-many.scala diff --git a/tests/run-with-compiler/quote-run-staged-interpreter.check b/tests/run-staging/quote-run-staged-interpreter.check similarity index 100% rename from tests/run-with-compiler/quote-run-staged-interpreter.check rename to tests/run-staging/quote-run-staged-interpreter.check diff --git a/tests/run-with-compiler/quote-run-staged-interpreter.scala b/tests/run-staging/quote-run-staged-interpreter.scala similarity index 100% rename from tests/run-with-compiler/quote-run-staged-interpreter.scala rename to tests/run-staging/quote-run-staged-interpreter.scala diff --git a/tests/run-with-compiler/quote-run-with-settings.check b/tests/run-staging/quote-run-with-settings.check similarity index 100% rename from tests/run-with-compiler/quote-run-with-settings.check rename to tests/run-staging/quote-run-with-settings.check diff --git a/tests/run-with-compiler/quote-run-with-settings.scala b/tests/run-staging/quote-run-with-settings.scala similarity index 100% rename from tests/run-with-compiler/quote-run-with-settings.scala rename to tests/run-staging/quote-run-with-settings.scala diff --git a/tests/run-with-compiler/quote-run.check b/tests/run-staging/quote-run.check similarity index 100% rename from tests/run-with-compiler/quote-run.check rename to tests/run-staging/quote-run.check diff --git a/tests/run-with-compiler/quote-run.scala b/tests/run-staging/quote-run.scala similarity index 100% rename from tests/run-with-compiler/quote-run.scala rename to tests/run-staging/quote-run.scala diff --git a/tests/run-with-compiler/quote-show-blocks.check b/tests/run-staging/quote-show-blocks.check similarity index 100% rename from tests/run-with-compiler/quote-show-blocks.check rename to tests/run-staging/quote-show-blocks.check diff --git a/tests/run-with-compiler/quote-show-blocks.scala b/tests/run-staging/quote-show-blocks.scala similarity index 100% rename from tests/run-with-compiler/quote-show-blocks.scala rename to tests/run-staging/quote-show-blocks.scala diff --git a/tests/run-with-compiler/quote-simple-hole.scala b/tests/run-staging/quote-simple-hole.scala similarity index 100% rename from tests/run-with-compiler/quote-simple-hole.scala rename to tests/run-staging/quote-simple-hole.scala diff --git a/tests/run-with-compiler/quote-toExprOfTuple.check b/tests/run-staging/quote-toExprOfTuple.check similarity index 100% rename from tests/run-with-compiler/quote-toExprOfTuple.check rename to tests/run-staging/quote-toExprOfTuple.check diff --git a/tests/run-with-compiler/quote-toExprOfTuple.scala b/tests/run-staging/quote-toExprOfTuple.scala similarity index 100% rename from tests/run-with-compiler/quote-toExprOfTuple.scala rename to tests/run-staging/quote-toExprOfTuple.scala diff --git a/tests/run-with-compiler/quote-two-captured-ref.check b/tests/run-staging/quote-two-captured-ref.check similarity index 100% rename from tests/run-with-compiler/quote-two-captured-ref.check rename to tests/run-staging/quote-two-captured-ref.check diff --git a/tests/run-with-compiler/quote-two-captured-ref.scala b/tests/run-staging/quote-two-captured-ref.scala similarity index 100% rename from tests/run-with-compiler/quote-two-captured-ref.scala rename to tests/run-staging/quote-two-captured-ref.scala diff --git a/tests/run-with-compiler/quote-type-tags.check b/tests/run-staging/quote-type-tags.check similarity index 100% rename from tests/run-with-compiler/quote-type-tags.check rename to tests/run-staging/quote-type-tags.check diff --git a/tests/run-with-compiler/quote-type-tags.scala b/tests/run-staging/quote-type-tags.scala similarity index 100% rename from tests/run-with-compiler/quote-type-tags.scala rename to tests/run-staging/quote-type-tags.scala diff --git a/tests/run-with-compiler/quote-unrolled-foreach.check b/tests/run-staging/quote-unrolled-foreach.check similarity index 100% rename from tests/run-with-compiler/quote-unrolled-foreach.check rename to tests/run-staging/quote-unrolled-foreach.check diff --git a/tests/run-with-compiler/quote-unrolled-foreach.scala b/tests/run-staging/quote-unrolled-foreach.scala similarity index 100% rename from tests/run-with-compiler/quote-unrolled-foreach.scala rename to tests/run-staging/quote-unrolled-foreach.scala diff --git a/tests/run-with-compiler/quote-valueof-list.check b/tests/run-staging/quote-valueof-list.check similarity index 100% rename from tests/run-with-compiler/quote-valueof-list.check rename to tests/run-staging/quote-valueof-list.check diff --git a/tests/run-with-compiler/quote-valueof-list.scala b/tests/run-staging/quote-valueof-list.scala similarity index 100% rename from tests/run-with-compiler/quote-valueof-list.scala rename to tests/run-staging/quote-valueof-list.scala diff --git a/tests/run-with-compiler/quote-valueof.check b/tests/run-staging/quote-valueof.check similarity index 100% rename from tests/run-with-compiler/quote-valueof.check rename to tests/run-staging/quote-valueof.check diff --git a/tests/run-with-compiler/quote-valueof.scala b/tests/run-staging/quote-valueof.scala similarity index 100% rename from tests/run-with-compiler/quote-valueof.scala rename to tests/run-staging/quote-valueof.scala diff --git a/tests/run-with-compiler/quote-var.check b/tests/run-staging/quote-var.check similarity index 100% rename from tests/run-with-compiler/quote-var.check rename to tests/run-staging/quote-var.check diff --git a/tests/run-with-compiler/quote-var.scala b/tests/run-staging/quote-var.scala similarity index 100% rename from tests/run-with-compiler/quote-var.scala rename to tests/run-staging/quote-var.scala diff --git a/tests/run-with-compiler/shonan-hmm-simple.check b/tests/run-staging/shonan-hmm-simple.check similarity index 100% rename from tests/run-with-compiler/shonan-hmm-simple.check rename to tests/run-staging/shonan-hmm-simple.check diff --git a/tests/run-with-compiler/shonan-hmm-simple.scala b/tests/run-staging/shonan-hmm-simple.scala similarity index 100% rename from tests/run-with-compiler/shonan-hmm-simple.scala rename to tests/run-staging/shonan-hmm-simple.scala diff --git a/tests/run-with-compiler/shonan-hmm.check b/tests/run-staging/shonan-hmm.check similarity index 100% rename from tests/run-with-compiler/shonan-hmm.check rename to tests/run-staging/shonan-hmm.check diff --git a/tests/run-with-compiler/shonan-hmm/Blas.scala b/tests/run-staging/shonan-hmm/Blas.scala similarity index 100% rename from tests/run-with-compiler/shonan-hmm/Blas.scala rename to tests/run-staging/shonan-hmm/Blas.scala diff --git a/tests/run-with-compiler/shonan-hmm/Complex.scala b/tests/run-staging/shonan-hmm/Complex.scala similarity index 100% rename from tests/run-with-compiler/shonan-hmm/Complex.scala rename to tests/run-staging/shonan-hmm/Complex.scala diff --git a/tests/run-with-compiler/shonan-hmm/Lifters.scala b/tests/run-staging/shonan-hmm/Lifters.scala similarity index 100% rename from tests/run-with-compiler/shonan-hmm/Lifters.scala rename to tests/run-staging/shonan-hmm/Lifters.scala diff --git a/tests/run-with-compiler/shonan-hmm/MVmult.scala b/tests/run-staging/shonan-hmm/MVmult.scala similarity index 100% rename from tests/run-with-compiler/shonan-hmm/MVmult.scala rename to tests/run-staging/shonan-hmm/MVmult.scala diff --git a/tests/run-with-compiler/shonan-hmm/PV.scala b/tests/run-staging/shonan-hmm/PV.scala similarity index 100% rename from tests/run-with-compiler/shonan-hmm/PV.scala rename to tests/run-staging/shonan-hmm/PV.scala diff --git a/tests/run-with-compiler/shonan-hmm/Ring.scala b/tests/run-staging/shonan-hmm/Ring.scala similarity index 100% rename from tests/run-with-compiler/shonan-hmm/Ring.scala rename to tests/run-staging/shonan-hmm/Ring.scala diff --git a/tests/run-with-compiler/shonan-hmm/Test.scala b/tests/run-staging/shonan-hmm/Test.scala similarity index 100% rename from tests/run-with-compiler/shonan-hmm/Test.scala rename to tests/run-staging/shonan-hmm/Test.scala diff --git a/tests/run-with-compiler/shonan-hmm/UnrolledExpr.scala b/tests/run-staging/shonan-hmm/UnrolledExpr.scala similarity index 100% rename from tests/run-with-compiler/shonan-hmm/UnrolledExpr.scala rename to tests/run-staging/shonan-hmm/UnrolledExpr.scala diff --git a/tests/run-with-compiler/shonan-hmm/Vec.scala b/tests/run-staging/shonan-hmm/Vec.scala similarity index 100% rename from tests/run-with-compiler/shonan-hmm/Vec.scala rename to tests/run-staging/shonan-hmm/Vec.scala diff --git a/tests/run-with-compiler/shonan-hmm/VecOp.scala b/tests/run-staging/shonan-hmm/VecOp.scala similarity index 100% rename from tests/run-with-compiler/shonan-hmm/VecOp.scala rename to tests/run-staging/shonan-hmm/VecOp.scala diff --git a/tests/run-with-compiler/shonan-hmm/VecROp.scala b/tests/run-staging/shonan-hmm/VecROp.scala similarity index 100% rename from tests/run-with-compiler/shonan-hmm/VecROp.scala rename to tests/run-staging/shonan-hmm/VecROp.scala diff --git a/tests/run-with-compiler/shonan-hmm/Vmults.scala b/tests/run-staging/shonan-hmm/Vmults.scala similarity index 100% rename from tests/run-with-compiler/shonan-hmm/Vmults.scala rename to tests/run-staging/shonan-hmm/Vmults.scala diff --git a/tests/run-with-compiler/staged-streams_1.check b/tests/run-staging/staged-streams_1.check similarity index 100% rename from tests/run-with-compiler/staged-streams_1.check rename to tests/run-staging/staged-streams_1.check diff --git a/tests/run-with-compiler/staged-streams_1.scala b/tests/run-staging/staged-streams_1.scala similarity index 100% rename from tests/run-with-compiler/staged-streams_1.scala rename to tests/run-staging/staged-streams_1.scala diff --git a/tests/run-with-compiler/staged-tuples/StagedTuple.scala b/tests/run-staging/staged-tuples/StagedTuple.scala similarity index 100% rename from tests/run-with-compiler/staged-tuples/StagedTuple.scala rename to tests/run-staging/staged-tuples/StagedTuple.scala diff --git a/tests/run-with-compiler/staged-tuples/Test.scala b/tests/run-staging/staged-tuples/Test.scala similarity index 100% rename from tests/run-with-compiler/staged-tuples/Test.scala rename to tests/run-staging/staged-tuples/Test.scala diff --git a/tests/run-with-compiler/tasty-extractors-constants-2.check b/tests/run-staging/tasty-extractors-constants-2.check similarity index 100% rename from tests/run-with-compiler/tasty-extractors-constants-2.check rename to tests/run-staging/tasty-extractors-constants-2.check diff --git a/tests/run-with-compiler/tasty-extractors-constants-2/quoted_1.scala b/tests/run-staging/tasty-extractors-constants-2/quoted_1.scala similarity index 100% rename from tests/run-with-compiler/tasty-extractors-constants-2/quoted_1.scala rename to tests/run-staging/tasty-extractors-constants-2/quoted_1.scala diff --git a/tests/run-with-compiler/tasty-extractors-constants-2/quoted_2.scala b/tests/run-staging/tasty-extractors-constants-2/quoted_2.scala similarity index 100% rename from tests/run-with-compiler/tasty-extractors-constants-2/quoted_2.scala rename to tests/run-staging/tasty-extractors-constants-2/quoted_2.scala