Skip to content

Conversation

@honnix
Copy link
Contributor

@honnix honnix commented May 11, 2020

  • Use whitebox.Context explicitly
  • Show a complete code snippet (it was not obvious to me as a new macro developer how to replace those ???)

Still I couldn't make the example work under 2.12.11 with scala-maven-plugin:

      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <configuration>
          <args>
            <arg>-language:experimental.macros</arg>
            <arg>-feature</arg>
          </args>
          <compilerPlugins>
            <compilerPlugin>
              <groupId>org.scalamacros</groupId>
              <artifactId>paradise_2.12.11</artifactId>
              <version>2.1.1</version>
            </compilerPlugin>
          </compilerPlugins>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

* Use `whitebox.Context` explicitly
* Show a complete code snippet (it was not obvious to me as a new macro developer how to replace those `???`)
@honnix
Copy link
Contributor Author

honnix commented May 11, 2020

I think I understand the problem: the compiler plugin needs to be enable for both macro implementation and usage, in case they are in different modules/projects.

@SethTisue
Copy link
Member

SethTisue commented May 11, 2020

this certainly looks plausible

is there someone watching the repo who has enough macro experience to review this?

@SethTisue SethTisue merged commit 6fed8bb into scala:master May 20, 2020
@SethTisue
Copy link
Member

thank you!

SethTisue added a commit to SethTisue/docs.scala-lang that referenced this pull request Oct 22, 2024
SethTisue added a commit to SethTisue/docs.scala-lang that referenced this pull request Oct 22, 2024
fResult pushed a commit to fResult/docs.scala-lang that referenced this pull request Oct 27, 2024
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