You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compilerDeps = [] # Compiler plug-ins (specified in the same format as scalaDeps)
226
227
moduleDeps = [] # Module dependencies
227
228
mainClass = ""# Optional entry point; needed for running/packaging module
228
229
targets = [] # Platform targets
@@ -444,6 +445,20 @@ Setting `moduleDeps` to `core`, gives `webapp` and `server` access to its compil
444
445
445
446
`bloop compile webapp` triggers the compilation of `core-js` whereas `bloop compile server` would compile `core-jvm`.
446
447
448
+
### Compiler plug-ins
449
+
A module can add Scala plug-ins with `compilerDeps`. The setting behaves like `scalaDeps`, but also adds the `-Xplugin` parameter to the Scala compiler when the module is compiled. A minimal example looks as follows:
450
+
451
+
```toml
452
+
[module.macros.js]
453
+
compilerDeps = [
454
+
["org.scalamacros", "paradise", "2.1.1", "full"]
455
+
]
456
+
```
457
+
458
+
Note that plug-ins are inherited by all dependent modules such that `compilerDeps` only needs to be defined on the base module.
459
+
460
+
For a complete cross-compiled Macro Paradise example, please refer to [this project](test/example-paradise/).
461
+
447
462
### Project dependencies
448
463
External builds can be imported into the scope by using the `import` setting at the root level. It can point to a build file, or its parent directory in which case it will attempt to load `<path>/build.toml`. From the imported file, Seed will only make its modules accessible. Other project-level settings are being ignored. Multiple projects can be imported as `import` is a list.
0 commit comments