Skip to main content
Version: 2.11 (deprecated)

scalac


The Scala compiler.

Backend: pants.backend.experimental.scala

Config section: [scalac]

Basic options

args

--scalac-args="[<shell_str>, <shell_str>, ...]"
PANTS_SCALAC_ARGS
pants.toml
[scalac]
args = [
<shell_str>,
<shell_str>,
...,
]
default: []

Arguments to pass directly to scalac, e.g. --scalac-args='-encoding UTF-8'.

plugins_for_resolve

--scalac-plugins-for-resolve="{'key1': val1, 'key2': val2, ...}"
PANTS_SCALAC_PLUGINS_FOR_RESOLVE
pants.toml
[scalac.plugins_for_resolve]
key1 = val1
key2 = val2
...
default: {}

A dictionary, whose keys are the names of each JVM resolve that requires default scalac plugins, and the value is a comma-separated string consisting of scalac plugin names. Each specified plugin must have a corresponding scalac_plugin target that specifies that name in either its plugin_name field or is the same as its target name.

Advanced options

None

Deprecated options

plugins_global

--scalac-plugins-global="['<str>', '<str>', ...]"
PANTS_SCALAC_PLUGINS_GLOBAL
pants.toml
[scalac]
plugins_global = [
'<str>',
'<str>',
...,
]
default: []
Deprecated, will be removed in version: 2.12.0.dev0.
Use `--scalac-plugins-for-resolve` instead to use user resolves

A list of addresses of scalac_plugin targets which should be used for compilation of all Scala targets in a build.

If you set this, you must also set [scalac].plugins_global_lockfile.

plugins_global_lockfile

--scalac-plugins-global-lockfile=<str>
PANTS_SCALAC_PLUGINS_GLOBAL_LOCKFILE
pants.toml
[scalac]
plugins_global_lockfile = <str>
default: <default>
Deprecated, will be removed in version: 2.12.0.dev0.
Use `--scalac-plugins-for-resolve` instead, which will add plugin dependencies to JVM user resolves.

The filename of the lockfile for global plugins. You must set this option to a file path, e.g. '3rdparty/jvm/global_scalac_plugins.lock', if you set [scalac].plugins_global.

None