Proposal: Changes to implicit resolution rules

Quill’s materializeSchemaMeta is a case-in-point. This functionality (currently) uses macros activated by low-priority implicits which synthesize a entity derivation (which is eventually supposed to materialize into SQL). I have gladly ripped out the implicit-ordering code and replaced it with:

summonExpr(given '[SchemaMeta[T]]) match {
  case Some(meta) =>
    '{ $meta.unquote }

  case None => 
    '{ new EntityQuery[T]() }
}

This is a very intuitive and beautiful pattern compared to the implicit def trait-extension/override hackery of High/Low ordered implicits that was needed before.

1 Like