https://pantsbuild.org/ logo
#general
Title
# general
f

future-butcher-94831

11/06/2018, 3:50 PM
Hello, I’m trying to get 👖 to run with a separate configuration file (with the ultimate goal of running in CodeBuild w/ build caching). I’ve set the following in a “local.ini” file—
Copy code
[GLOBAL]
pants_workdir: /Users/ddcaaronm/Desktop/pants/.pants.d
plugin_cache_dir: /Users/ddcaaronm/Desktop/pants/plugin_cache/

[cache]
read_from: ['/Users/ddcaaronm/Desktop/pants/.cache']
write_to: ['/Users/ddcaaronm/Desktop/pants/.cache']
Most concerningly, compilation fails with the following:
Copy code
[1/6] Compiling 1 scala-js source in 1 target (src/scala/com/coxautoinc/mediastrategy/strategize/domain:domain-js).
09:18:46 00:24       [compile]

                   compile(src/scala/com/coxautoinc/mediastrategy/strategize/domain:domain-js) failed: /Users/ddcaaronm/git/strategy-recommendations is not a directory containing /Users/ddcaaronm/Desktop/pants/.pants.d/resolve/scala-js-compile/a53b6931478d/src.scala.com.coxautoinc.mediastrategy.strategize.domain.domain-js/current/z.analysis
FAILURE: Compilation failure: Failed jobs: compile(src/scala/com/coxautoinc/mediastrategy/strategize/domain:domain-js)
Is this caused by a configuration issue? Secondly, when I look at my config w/
./pants --pants-config-files=local.ini options cache
many directories don’t appear to inherit from the settings specified in
local.ini
. Would I need to specificy all of these options? I expected these to be picked up from the
cache.read_from/write_to
config.
Copy code
cache.read_from = ['/Users/ddcaaronm/Desktop/pants/.cache'] (from CONFIG in local.ini)
...
cache.write_to = ['/Users/ddcaaronm/Desktop/pants/.cache'] (from CONFIG in local.ini)
cache.analysis.read_from = ['/Users/ddcaaronm/git/strategy-recommendations/.cache'] (from HARDCODED)
cache.analysis.write_to = ['/Users/ddcaaronm/git/strategy-recommendations/.cache'] (from HARDCODED)
cache.analysis.zinc.read_from = ['/Users/ddcaaronm/git/strategy-recommendations/.cache'] (from HARDCODED)
cache.analysis.zinc.write_to = ['/Users/ddcaaronm/git/strategy-recommendations/.cache'] (from HARDCODED)
cache.bash-completion.read_from = ['/Users/ddcaaronm/git/strategy-recommendations/.cache'] (from HARDCODED)
cache.bash-completion.write_to = ['/Users/ddcaaronm/git/strategy-recommendations/.cache'] (from HARDCODED)
cache.bench.read_from = ['/Users/ddcaaronm/git/strategy-recommendations/.cache'] (from HARDCODED)
cache.bench.write_to = ['/Users/ddcaaronm/git/strategy-recommendations/.cache'] (from HARDCODED)
cache.binary.read_from = ['/Users/ddcaaronm/git/strategy-recommendations/.cache'] (from HARDCODED)
cache.binary.write_to = ['/Users/ddcaaronm/git/strategy-recommendations/.cache'] (from HARDCODED)
e

enough-analyst-54434

11/06/2018, 3:58 PM
Is this caused by a configuration issue?
Yes. You are mixing a few things in here. The
[cache]
setup is fine - it can be anywhere. The
pants_workdir
must be within the clone. That's what "/Users/ddcaaronm/git/strategy-recommendations is not a directory containing /Users/ddcaaronm/Desktop/pants/.pants.d/..." is trying to say. Unless you have a reason to move the
pants_workdir
probabaly best to leave that alone.
And for completeness, the
plugin_cache_dir
can also be anywhere.
5 Views