diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40b5376..c9bc436 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,56 +6,20 @@ on: pull_request: branches: [ main ] -# Local snapshot versions used across the publishLocal dev loop. -# Keep these in sync with the `using dep` lines in project.scala. -env: - MADE_VERSION: 0.1.3-done-SNAPSHOT - MCODEC_VERSION: 0.0.0-done-SNAPSHOT - jobs: build: name: Build and test runs-on: ubuntu-latest steps: - - name: Checkout mrpc - uses: actions/checkout@v6 - with: - path: mrpc - - # Pinned upstream commits. made is consumed from a feature branch until - # its PR merges; bump these SHAs to the merged refs afterwards. - - name: Checkout made - uses: actions/checkout@v6 - with: - repository: halotukozak/made - ref: 16bfbdbd7022e644e8f803be864c0c98ef53ac15 - path: made - - - name: Checkout mcodec - uses: actions/checkout@v6 - with: - repository: halotukozak/mcodec - ref: 4f4ece438b766f18558cb42ccaf5df894bfed4ff - path: mcodec + - uses: actions/checkout@v6 - name: Setup coursier cache uses: coursier/cache-action@v8.1 - uses: VirtusLab/scala-cli-setup@v1 - - name: Publish made locally - run: scala-cli --power publish local made --project-version "$MADE_VERSION" - - # mcodec must resolve the same made artifact so there is exactly one - # made typeclass set on the classpath. - - name: Repoint mcodec onto the local made - run: sed -i -E 's#(io\.github\.halotukozak::made:)[^[:space:]]+#\1'"$MADE_VERSION"'#' mcodec/project.scala - - - name: Publish mcodec locally - run: scala-cli --power publish local mcodec --project-version "$MCODEC_VERSION" - - name: Check formatting - run: scala-cli --power fmt --check mrpc + run: scala-cli --power fmt --check . - name: Run tests - run: scala-cli --power test mrpc \ No newline at end of file + run: scala-cli --power test . diff --git a/project.scala b/project.scala index a8fff18..e6b0165 100644 --- a/project.scala +++ b/project.scala @@ -1,8 +1,7 @@ //> using scala 3.8.4 -// mcodec is resolved from a local publishLocal SNAPSHOT. -//> using dep io.github.halotukozak::made:0.2.1-SNAPSHOT -//> using dep io.github.halotukozak::mcodec:0.0.0-done-SNAPSHOT +//> using dep io.github.halotukozak::made:0.3.0 +//> using dep io.github.halotukozak::mcodec:0.1.0 //> using test.dep org.scalameta::munit:1.3.3 //> using test.dep org.scalameta::munit-scalacheck:1.3.0 @@ -17,12 +16,16 @@ //> using options -Ycheck:all //> using options -Yexplain-lowlevel -Yexplicit-nulls //> using options -Yshow-suppressed-errors -Yshow-var-bounds -//> using options -Wsafe-init -Werror -Wunused:all +// -Wsafe-init is disabled: the checker never terminates on this codebase's +// inline-derivation-heavy code (confirmed via thread dump stuck for 10+ min +// recursing through dotty.tools.dotc.transform.init.Semantic$$anon$1.traverse +// on TypeAccumulator.foldOver). Re-enable once upstream fixes this, or once +// derivation is scoped down enough for the checker to terminate. +//> using options -Werror -Wunused:all //> using options -Xmax-inlines 100 ////> using options -Xprint-suspension - //> using options -Yprofile-enabled -Yprofile-trace:debug.json //> using publish.organization io.github.halotukozak //> using publish.name mrpc diff --git a/src/mrpc/derive/MetadataDerivation.scala b/src/mrpc/derive/MetadataDerivation.scala index 50592fe..40b32d8 100644 --- a/src/mrpc/derive/MetadataDerivation.scala +++ b/src/mrpc/derive/MetadataDerivation.scala @@ -198,8 +198,8 @@ private[mrpc] object MetadataDerivation: * been widened to the bare `Context` supertype. */ inline private def allTerms[A](using Context): List[A] = inline ctx match - case ctx: Context.Method => getAllAnnotations(ctx.op)(using containsOnly.refl)[A & Annotation] - case ctx: Context.Param => getAllAnnotations(ctx.underlying)(using containsOnly.refl)[A & Annotation] + case ctx: Context.Method => ctx.op.getAllAnnotations[A & Annotation] + case ctx: Context.Param => ctx.underlying.getAllAnnotations[A & Annotation] case _: Context.Trait => compiletime.error("@reifyAnnot is not valid at the trait level") inline private def reifyAnnot[Param](arity: SlotArity)(using Context): Any =