-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolving structural issues with scalameta
- Loading branch information
1 parent
79abd3b
commit d09ad01
Showing
3 changed files
with
11 additions
and
10 deletions.
There are no files selected for viewing
14 changes: 8 additions & 6 deletions
14
modules/codegen/src/main/scala/com/twilio/guardrail/circe/CirceVersion.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
package com.twilio.guardrail.circe | ||
|
||
import scala.meta._ | ||
|
||
sealed trait CirceVersion { | ||
def encoderObject: String | ||
def print: String | ||
def encoderObject: Type | ||
def print: Term.Name | ||
} | ||
object CirceVersion { | ||
case object V011 extends CirceVersion { | ||
def encoderObject = "ObjectEncoder" | ||
def print = "pretty" | ||
def encoderObject = t"ObjectEncoder" | ||
def print = q"pretty" | ||
} | ||
case object V012 extends CirceVersion { | ||
def encoderObject = "Encoder.AsObject" | ||
def print = "print" | ||
def encoderObject = t"Encoder.AsObject" | ||
def print = q"print" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters