Skip to content

fix: resolve Scala 3 macro issues (Quotes / TypeRepr) and introduce minimal testable SBT setup#167

Open
Emanuelgm1998 wants to merge 2 commits intotscircuit:mainfrom
Emanuelgm1998:main
Open

fix: resolve Scala 3 macro issues (Quotes / TypeRepr) and introduce minimal testable SBT setup#167
Emanuelgm1998 wants to merge 2 commits intotscircuit:mainfrom
Emanuelgm1998:main

Conversation

@Emanuelgm1998
Copy link
Copy Markdown

/claim #34

Fixes invalid Scala 3 macro usage that prevented compilation and restores a minimal, working SBT environment with test support.


Before

  • Compilation failed due to incorrect use of quotes.reflect.TypeRepr outside a valid Quotes context
  • Errors included:
    • "No given instance of type quoted.Quotes"
    • Type mismatches in TypeLambda / MatchType handling
  • No functional SBT setup
  • No test execution capability

After

  • Macro compiles and executes correctly under Scala 3

  • Proper scoping of Quotes and quotes.reflect.*

  • Removed unsafe casts and fixed type handling

  • Project builds successfully with SBT

  • Test suite runs and passes:

    Passed: Total 1, Failed 0


Technical Changes

  • Refactored macro to operate strictly within using Quotes
  • Correct handling of:
    • AppliedType
    • AndType / OrType
    • PolyType
    • TypeLambda
    • MatchType
    • Refinement
    • AnnotatedType
  • Introduced minimal SBT configuration (scalaVersion := 3.3.1)
  • Added ScalaTest dependency and runnable test suite
  • Cleaned repository and added .gitignore

Result

  • Compilation restored.
  • Macro behavior verified at runtime.
  • Repository is now buildable, testable, and reproducible.
Screen_Recording_20260408_053806_Chrome.mov

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
schematic-trace-solver Ready Ready Preview, Comment Apr 8, 2026 9:51am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant