Skip to content

Commit

Permalink
Rename macro to WitExport
Browse files Browse the repository at this point in the history
  • Loading branch information
danieletorelli committed May 8, 2024
1 parent 29a798d commit fdd28de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import scala.language.experimental.macros
import scala.reflect.macros.whitebox

@compileTimeOnly("Enable macro paradise to expand macro annotations")
final class Worker extends StaticAnnotation {
def macroTransform(annottees: Any*): Any = macro WorkerExport.impl
final class WitExport extends StaticAnnotation {
def macroTransform(annottees: Any*): Any = macro WitExportMacro.impl
}

object WorkerExport {
object WitExportMacro {
def impl(c: whitebox.Context)(annottees: c.Expr[Any]*): c.Expr[Any] = {
import c.universe._

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package example

@cloud.golem.Worker
@cloud.golem.WitExport
object ShoppingCart { self =>

def initializeCart(userId: String): String = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package example

@cloud.golem.Worker
@cloud.golem.WitExport
object ShoppingCart extends Api { self =>

def initializeCart(userId: String): WitResult[String, String] = {
Expand Down

0 comments on commit fdd28de

Please sign in to comment.