Skip to content

Commit 3e60227

Browse files
committed
[build] Stop letting IfDefPlugin combine compile sources into test sources
1 parent 2b72ea3 commit 3e60227

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

build.sbt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,16 @@ lazy val sharedJsSettings = Seq(
101101
)
102102

103103
lazy val base = (projectMatrix in file("Base"))
104+
// IfDefPlugin shoves all compile classes into the test compile path because the intention of IfDef is to make rust-style unit-tests-in-main-sources.
105+
// However, macro definitions being in the same source group is not supposed to work, and keeps causing issues for this macro-heavy project.
106+
// So. Copy the IfDefPlugin settings without the changes to Test/managedSources or Test/internalDependencyClasspath
107+
.disablePlugins(IfDefPlugin)
108+
.settings(
109+
libraryDependencies += "com.eed3si9n.ifdef" %% "ifdef-annotation" % IfDefPlugin.ifDefVersion % Provided,
110+
libraryDependencies += compilerPlugin("com.eed3si9n.ifdef" %% "ifdef-plugin" % IfDefPlugin.ifDefVersion),
111+
)
112+
.settings(inConfig(Compile)(IfDefPlugin.configurationSettings))
113+
// end ifdef
104114
.settings(sharedSettings)
105115
.settings(
106116
name := "string-context-parser-combinator",

0 commit comments

Comments
 (0)