ifdef icon indicating copy to clipboard operation
ifdef copied to clipboard

ifDefDeclations vs ifDefDeclarations

Open mio-19 opened this issue 1 year ago • 6 comments

I found different spelling on source code and blog https://eed3si9n.com/ifdef-in-scala-via-pre-typer-processing/

mio-19 avatar Aug 12 '24 01:08 mio-19

how can I change/override ifDefDeclations in build.sbt ?

mio-19 avatar Aug 12 '24 02:08 mio-19

how can I change/override ifDefDeclations in build.sbt ?

The only way seems to add sccalac flag -Xmacro-settings:com.eed3si9n.ifdef.declare:XXX

mio-19 avatar Aug 12 '24 03:08 mio-19

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).

eed3si9n avatar Aug 12 '24 04:08 eed3si9n

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?

mio-19 avatar Aug 12 '24 05:08 mio-19

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

eed3si9n avatar Aug 13 '24 03:08 eed3si9n

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.

mio-19 avatar Sep 25 '24 03:09 mio-19