• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 5717
72%
main: 93%

Build:
Build:
LAST BUILD BRANCH: csb/pex-v2.91.2
DEFAULT BRANCH: main
Ran 21 Jul 2015 02:40AM UTC
Jobs 10
Files 337
Run time 13min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
5717

push

travis-ci

Stu Hood
[group_task][jvm] Precompute compile contexts for all targets

PROBLEM:
Zinc learns about analysis files when they are passed in analysis-map argument. We always supply the analysis files for all targets in the build graph every time we invoke Zinc. The problem is that the paths to the analysis- and class files are computed separately by ScalaCompile and JavaZincCompile. This happens in compile_context() for isolated strategy, where a path is computed by concatenating target.id to the task's workdir. Basically compile_context() is only suitable for computing the context for the task's own targets, but we're (ab)using it for all targets in the build graph, when computing the value for analysis-map argument. This means some of the paths are incorrect and non-existent: e.g. path to java target analysis is computed by ScalaCompile as compile/jvm/scala/isolated-analysis/storage.clients.manhattan.client.src.main.java.java, while it should be compile/jvm/zinc-java/isolated-analysis/storage.clients.manhattan.client.src.main.java.java. Such incorrect paths are not matched with classpath entries in _upstream_analysis(), and therefore the corresponding analysis files are not included in the analysis-map argument. This causes Zinc to consider cross-language dependencies as binary dependencies and compare timestamps, which is suboptimal.

SOLUTION:
Compute the paths to analysis files more intelligently. The CompileContexts are computed in prepare_compile() (for both strategies) and saved in a global (target -> compile_context) map belonging to GroupTask. Then in compile_chunk(), this global map is used instead of calling _create_compile_contexts_for_targets(). This also possibly solves the boundary between tasks using global strategy (I believe they all map to same analysis and classdir) and the ones using isolated strategy.

DOWNSIDE:
GroupTask is now aware of the fact that it's in fact a compilation task, as does GroupMember. This was bound to happen anyway sinc... (continued)

17 of 17 new or added lines in 5 files covered. (100.0%)

14369 of 20204 relevant lines covered (71.12%)

1.34 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
100.0
src/python/pants/backend/jvm/tasks/jvm_compile/jvm_compile_global_strategy.py
1
100.0
src/python/pants/backend/jvm/tasks/jvm_compile/jvm_compile_isolated_strategy.py
4
100.0
src/python/pants/backend/jvm/tasks/jvm_compile/jvm_compile_strategy.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
src/python/pants/backend/jvm/subsystems/scala_platform.py
2
100.0
src/python/pants/base/payload.py
3
100.0
src/python/pants/goal/goal.py
3
100.0
src/python/pants/option/custom_types.py
3
100.0
src/python/pants/backend/jvm/tasks/checkstyle.py
5
100.0
src/python/pants/backend/jvm/subsystems/jvm_tool_mixin.py
7
100.0
src/python/pants/backend/jvm/tasks/nailgun_task.py
8
100.0
src/python/pants/option/parser.py
10
100.0
src/python/pants/backend/core/tasks/reporting_server.py
11
100.0
src/python/pants/java/nailgun_executor.py
18
100.0
src/python/pants/backend/jvm/tasks/jvm_compile/java/java_compile.py
23
100.0
src/python/pants/backend/core/tasks/task.py
26
100.0
src/python/pants/base/payload_field.py
33
100.0
src/python/pants/option/options.py
36
100.0
src/python/pants/backend/jvm/tasks/jvm_compile/jvm_compile_strategy.py
49
100.0
src/python/pants/backend/jvm/tasks/jvm_compile/scala/scala_compile.py
60
100.0
src/python/pants/reporting/reporting_server.py
69
100.0
src/python/pants/backend/jvm/tasks/jvm_compile/jvm_compile_isolated_strategy.py
74
100.0
src/python/pants/backend/jvm/tasks/jvm_compile/jvm_compile.py
Jobs
ID Job ID Ran Files Coverage
1 5717.1 (CI_FLAGS="-cjlpn 'Various pants self checks'") 21 Jul 2015 02:41AM UTC 0
Travis Job 5717.1
2 5717.2 (CI_FLAGS="-fkmsrcn -u 0/2 'Unit tests for pants and pants-plugins - shard 1'") 21 Jul 2015 02:40AM UTC 0
67.4
Travis Job 5717.2
3 5717.3 (CI_FLAGS="-fkmsrcn -u 1/2 'Unit tests for pants and pants-plugins - shard 2'") 21 Jul 2015 02:44AM UTC 0
66.5
Travis Job 5717.3
4 5717.4 (CI_FLAGS="-fkmsrcjlp 'Python contrib tests'") 21 Jul 2015 02:43AM UTC 0
Travis Job 5717.4
5 5717.5 (CI_FLAGS="-fkmsrjlpn -i 0/6 'Python integration tests for pants - shard 1'") 21 Jul 2015 02:44AM UTC 0
Travis Job 5717.5
6 5717.6 (CI_FLAGS="-fkmsrjlpn -i 1/6 'Python integration tests for pants - shard 2'") 21 Jul 2015 02:48AM UTC 0
Travis Job 5717.6
7 5717.7 (CI_FLAGS="-fkmsrjlpn -i 2/6 'Python integration tests for pants - shard 3'") 21 Jul 2015 02:48AM UTC 0
Travis Job 5717.7
8 5717.8 (CI_FLAGS="-fkmsrjlpn -i 3/6 'Python integration tests for pants - shard 4'") 21 Jul 2015 02:49AM UTC 0
Travis Job 5717.8
9 5717.9 (CI_FLAGS="-fkmsrjlpn -i 4/6 'Python integration tests for pants - shard 5'") 21 Jul 2015 02:53AM UTC 0
Travis Job 5717.9
10 5717.10 (CI_FLAGS="-fkmsrjlpn -i 5/6 'Python integration tests for pants - shard 6'") 21 Jul 2015 02:53AM UTC 0
Travis Job 5717.10
Source Files on build 5717
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #5717
  • d15c911c on github
  • Prev Build on twitter/pants-1.2.4 (#5659)
  • Next Build on twitter/pants-1.2.4 (#5737)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc