Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract a zinc subsystem to allow for more entrypoints #4720

Merged
merged 2 commits into from
Jul 5, 2017

Conversation

stuhood
Copy link
Member

@stuhood stuhood commented Jun 29, 2017

Problem

Pants' zinc wrapper tool is currently configured directly on the compile.zinc task, which would cause duplication if some other task wanted to use the zinc install (see #4477 in particular).

Solution

Extract a zinc subsystem which is required by the compile.zinc task, and which can be consumed from other tasks in the future.

Result

Because the tool key is the same, only the options which allow for re-configuring the tool location needed to be deprecated: if they were overriding tool locations, users will need to move them from --compile-zinc-zinc to --zinc-zinc, etc.

@stuhood
Copy link
Member Author

stuhood commented Jun 30, 2017

(holding off on merging this one, as it might not be necessary)

Copy link
Member

@mateor mateor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of a zinc subsytem, in general, which could perhaps tidy up some of the leaks that crept into jvm_compile

@stuhood stuhood merged commit 7da63e2 into pantsbuild:master Jul 5, 2017
@stuhood stuhood deleted the stuhood/extract-zinc-subsystem branch July 5, 2017 19:07
stuhood pushed a commit that referenced this pull request May 11, 2018
### Problem

(this change depends on #4728)

As described on #4728, we currently need internal knowledge of zinc analysis in order to make it portable, and to extract products that are used by other tasks. Since the zinc analysis format is changing significantly (moving to protobuf, gaining/losing fields, etc), we need to stop parsing it. 

### Solution

Incorporates the version of the zinc wrapper published in #4728, and uses it in a `analysis.zinc` task to generate the `product_deps_by_src` and `classes_by_source` products from a `zinc_analysis` product published by zinc.

Expands the extracted `Zinc` subsystem from #4720 to encapsulate compile dependency calculation, and expose the `FingerprintStrategy` and `DependencyContext` that `compile.zinc` was using.

### Result

Zinc analysis is now a black box from the perspective of the pants python code. Also, the `compile.jvm-dep-check` task moved to the `lint` goal, and gained the unused dependency checks that used to be inlined in `compile.zinc` (and which would have prevented separation of the analysis extraction task).

Fixes #4477, fixes #4513, fixes #4185, fixes #5444, and hopefully fixes a few other odd incremental compilation bugs.
stuhood pushed a commit that referenced this pull request May 11, 2018
### Problem

(this change depends on #4728)

As described on #4728, we currently need internal knowledge of zinc analysis in order to make it portable, and to extract products that are used by other tasks. Since the zinc analysis format is changing significantly (moving to protobuf, gaining/losing fields, etc), we need to stop parsing it. 

### Solution

Incorporates the version of the zinc wrapper published in #4728, and uses it in a `analysis.zinc` task to generate the `product_deps_by_src` and `classes_by_source` products from a `zinc_analysis` product published by zinc.

Expands the extracted `Zinc` subsystem from #4720 to encapsulate compile dependency calculation, and expose the `FingerprintStrategy` and `DependencyContext` that `compile.zinc` was using.

### Result

Zinc analysis is now a black box from the perspective of the pants python code. Also, the `compile.jvm-dep-check` task moved to the `lint` goal, and gained the unused dependency checks that used to be inlined in `compile.zinc` (and which would have prevented separation of the analysis extraction task).

Fixes #4477, fixes #4513, fixes #4185, fixes #5444, and hopefully fixes a few other odd incremental compilation bugs.
stuhood pushed a commit that referenced this pull request May 11, 2018
### Problem

(this change depends on #4728)

As described on #4728, we currently need internal knowledge of zinc analysis in order to make it portable, and to extract products that are used by other tasks. Since the zinc analysis format is changing significantly (moving to protobuf, gaining/losing fields, etc), we need to stop parsing it. 

### Solution

Incorporates the version of the zinc wrapper published in #4728, and uses it in a `analysis.zinc` task to generate the `product_deps_by_src` and `classes_by_source` products from a `zinc_analysis` product published by zinc.

Expands the extracted `Zinc` subsystem from #4720 to encapsulate compile dependency calculation, and expose the `FingerprintStrategy` and `DependencyContext` that `compile.zinc` was using.

### Result

Zinc analysis is now a black box from the perspective of the pants python code. Also, the `compile.jvm-dep-check` task moved to the `lint` goal, and gained the unused dependency checks that used to be inlined in `compile.zinc` (and which would have prevented separation of the analysis extraction task).

Fixes #4477, fixes #4513, fixes #4185, fixes #5444, and hopefully fixes a few other odd incremental compilation bugs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants