Skip to content

Conversation

Copy link

Copilot AI commented Nov 19, 2025

Updates Scala from 2.13.16 to 2.13.18. Scala 2.13.18 has stricter eta-expansion rules and changes how annotation trees with macro-generated defaults are handled.

Changes

Version Update

  • project/Commons.scala: scalaVersion → 2.13.18
  • Regenerated .github/workflows/ci.yml via sbt githubWorkflowGenerate

Redis Eta-Expansion Fixes

Explicit eta-expansion now required for case class constructors as function values:

// Before: XConsumerInfo.apply
// After: XConsumerInfo.apply(_)
val multiBulkAsXConsumerInfo: ReplyDecoder[XConsumerInfo] =
  flatMultiBulkAsMap(bulkAsUTF8, undecoded).andThen(XConsumerInfo.apply(_))

Mongo Method Disambiguation

Added explicit parameter lists to distinguish overloaded methods:

// Before: def listDatabases: Observable[Document]
// After: def listDatabases(): Observable[Document]
def listDatabases[T: GenCodec]: Observable[T] = listDatabases().map(...)

Macro Null Safety

Annotation trees can now be null for parameters with macro-generated defaults. Added filtering throughout MacroCommons.scala:

rawAnnotations(ss).filter(_.tree != null)

Known Issue

NewRpcMetadataTest fails to compile - Scala 2.13.18 returns null annotation trees for @infer parameters with macro-generated defaults. Production code unaffected. Requires upstream Scala fix or test refactoring.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/scala/scala/releases
    • Triggering command: curl -s REDACTED (http block)
  • www.scala-lang.org
    • Triggering command: curl -s REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

bump scala to 2.13.18


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits November 19, 2025 22:53
- Update scalaVersion in Commons.scala from 2.13.16 to 2.13.18
- Regenerate GitHub Actions workflow with new Scala version
- Fix eta-expansion issues in Redis ReplyDecoders for Scala 2.13.18
- Add empty parameter list to listDatabases() and listCollections() in Mongo to disambiguate from overloaded methods
- Add null checks for annotation trees in macro code to handle Scala 2.13.18 changes

Work in progress: Some tests are still failing due to macro compatibility issues with Scala 2.13.18

Co-authored-by: halotukozak <[email protected]>
This addresses a remaining issue where annotation trees can be null in Scala 2.13.18 when they have macro-generated default values. The fix adds explicit null checks before pattern matching on annotation trees.

Note: Some tests (NewRpcMetadataTest) are still failing with "Not a primary constructor call tree: null". This appears to be a deeper compatibility issue with how Scala 2.13.18 handles annotation trees that needs further investigation.

Co-authored-by: halotukozak <[email protected]>
All production code compiles successfully with Scala 2.13.18. The changes include:
- Version bump from 2.13.16 to 2.13.18
- Fixed eta-expansion issues in Redis
- Fixed method disambiguation in Mongo
- Added null safety checks for annotation trees in macros

Note: NewRpcMetadataTest has a compatibility issue with Scala 2.13.18's handling of annotation trees with macro-generated defaults. This needs investigation or may require a Scala compiler fix.

Co-authored-by: halotukozak <[email protected]>
Copilot AI changed the title [WIP] Bump Scala version to 2.13.18 Bump Scala to 2.13.18 Nov 19, 2025
Copilot AI requested a review from halotukozak November 19, 2025 23:18
Copilot finished work on behalf of halotukozak November 19, 2025 23:19
@halotukozak halotukozak marked this pull request as ready for review November 19, 2025 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants