ifdef
ifdef copied to clipboard
ifDefDeclations vs ifDefDeclarations
I found different spelling on source code and blog https://eed3si9n.com/ifdef-in-scala-via-pre-typer-processing/
how can I change/override ifDefDeclations in build.sbt ?
how can I change/override ifDefDeclations in build.sbt ?
The only way seems to add sccalac flag -Xmacro-settings:com.eed3si9n.ifdef.declare:XXX
Oops, it seems like I have a typo in my plugin - https://github.com/eed3si9n/ifdef/blob/main/plugin/src/main/scala/IfDefPlugin.scala#L16
Compile / ifDefDeclations += "foo"
might work (until I fix the typo).
Oops, it seems like I have a typo in my plugin - https://github.com/eed3si9n/ifdef/blob/main/plugin/src/main/scala/IfDefPlugin.scala#L16
Compile / ifDefDeclations += "foo"might work (until I fix the typo).
I tried this but it didn't seem to work. Does it work on your machine?
Yea, I think so:
sbt:ifdef> show Compile/scalacOptions
[info] * -Xplugin:/Users/xxx/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/eed3si9n/ifdef/ifdef-plugin_2.13/0.3.0/ifdef-plugin_2.13-0.3.0.jar
[info] * -Xmacro-settings
[info] * com.eed3si9n.ifdef.declare:compile
[info] * -Xmacro-settings
[info] * com.eed3si9n.ifdef.declare:scalaBinaryVersion:2.13
[info] * -Xmacro-settings
[info] * com.eed3si9n.ifdef.declare:foo
how can I change/override ifDefDeclations in build.sbt ?
The only way seems to add sccalac flag
-Xmacro-settings:com.eed3si9n.ifdef.declare:XXX
I am satisfied with this solution. I'm looking forward to seeing the typo fixed.