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

pants/zinc chokes on compile #5444

Closed
wisechengyi opened this issue Feb 7, 2018 · 2 comments · Fixed by #4729
Closed

pants/zinc chokes on compile #5444

wisechengyi opened this issue Feb 7, 2018 · 2 comments · Fixed by #4729
Labels

Comments

@wisechengyi
Copy link
Contributor

wisechengyi commented Feb 7, 2018

Checkout https://github.com/wisechengyi/coursier/tree/compile_stuck

Compile chokes with >= 1.3.0. Changing pants version to 1.2.1 in pants.ini works.

./pants compile cli/::
...
                   [7/8] Compiling 24 zinc sources in 1 target (cli/src/main/scala-2.12:cli).
16:12:30 00:33       [compile]
                     
16:12:30 00:33         [zinc]
                       [info] Compiling 24 Scala sources to /Users/yic/workspace/coursier_dev/.pants.d/compile/zinc/27609ddd7aa2/cli.src.main.scala-2.12.cli/current/classes...
                       [warn] /Users/yic/workspace/coursier_dev/cli/src/main/scala-2.12/coursier/cli/Bootstrap.scala:120:44: Adapting argument list by creating a 2-tuple: this may not be what you want.
                       [warn]         signature: ArrowAssoc.->[B](y: B): (A, B)
                       [warn]   given arguments: subUrls, subFiles
                       [warn]  after adaptation: ArrowAssoc.->((subUrls, subFiles): (Seq[String], Seq[java.io.File]))
                       [warn]             val updatedAcc = acc + (target -> (subUrls, subFiles))
                       [warn]                                            ^
                       [warn] /Users/yic/workspace/coursier_dev/cli/src/main/scala-2.12/coursier/cli/Bootstrap.scala:77:11: local val properties0 in method run is never used
                       [warn]       val properties0 = validProperties.map { s =>
                       [warn]           ^
                       [warn] /Users/yic/workspace/coursier_dev/cli/src/main/scala-2.12/coursier/cli/Fetch.scala:9:23: Unused import
                       [warn] import scala.language.reflectiveCalls
                       [warn]                       ^
                       [warn] /Users/yic/workspace/coursier_dev/cli/src/main/scala-2.12/coursier/cli/scaladex/Scaladex.scala:12:31: Unused import
                       [warn] import scalaz.{ -\/, EitherT, Monad, Nondeterminism, \/, \/- }
                       [warn]                               ^
                       [warn] /Users/yic/workspace/coursier_dev/cli/src/main/scala-2.12/coursier/cli/scaladex/Scaladex.scala:12:54: Unused import
                       [warn] import scalaz.{ -\/, EitherT, Monad, Nondeterminism, \/, \/- }
                       [warn]                                                      ^
                       [warn] /Users/yic/workspace/coursier_dev/cli/src/main/scala-2.12/coursier/cli/scaladex/Scaladex.scala:16:24: Unused import
                       [warn] import scalaz.std.list._
                       [warn]                        ^
                       ^CINFO] killing nailgun server pid=20117
INFO] killing nailgun server pid=20137
INFO] killing nailgun server pid=22329
@stuhood
Copy link
Member

stuhood commented Feb 7, 2018

Would be interesting to try with #4729. Have heard reports that the version of zinc we're currently using has issues with shapeless and possibly also with scalaz. I hope to resume that one soon.

stuhood pushed a commit that referenced this issue 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 issue 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 issue 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.
@wisechengyi
Copy link
Contributor Author

wisechengyi commented Jun 21, 2018

Thanks @stuhood! Confirmed that it works now. coursier/coursier#876

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants