Stu Hood got a fish trophy!

Create and use stable symlinks for the target results dir

Review Request #3553 - Created March 10, 2016 and submitted

Information
Stu Hood
pants
3029
Reviewers
pants-reviews
gmalmquist, peiyu, wisechengyi, zundel

One of the effects of the unique/immutable results dir change was that the target id for codegen targets contains a hash that changes whenever the codegen target is invalidated. An unstable target id makes it impossible to clean up cache entries on a target-by-target basis (because each new version of the target has a new target id) and makes it necessary to re-load IDE projects whenever codegen inputs change.

  • Changes the vt.results_dir into a stably-named symlink to the unique/unstable vt.current_results_dir (ie, the immutable copy).
  • Uses os.path.realpath in create_canonical_classpath, to stabilize a classpath as it is exported.

https://travis-ci.org/pantsbuild/pants/builds/116689746

Stu Hood
Eric Ayers
Yi Cheng
Peiyu Wang
Stu Hood
Garrett Malmquist
Stu Hood
Stu Hood
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 4d1796ca7964e7bce89b6f7a8f5d4ca2195e1bd0

Eric Ayers

FYI: We are seeing errors from zinc after this upload for local development builds

                   compile(core/common/src/main/java:lib) failed: [Errno 1] Operation not permitted: '/Users/zundel/Development/java/.pants.d/compile/zinc/252d64521cf9/core.common.src.main.java.lib/current'
05:57:16 00:42         [cache] 
                   compile(sharded-jooq/sharded-jooq-annotations/src/main/java:lib) failed: [Errno 1] Operation not permitted: '/Users/zundel/Development/java/.pants.d/compile/zinc/252d64521cf9/sharded-jooq.sharded-jooq-annotations.src.main.java.lib/current'

A ./pants clean-all fixes it. Every dev is having to run this locally.

No problems in CI where we don't have incremental compile enabled and we bumped the global cache version number.

  1. @Stu. I filed a github issue on this: https://github.com/pantsbuild/pants/issues/3087 in case there is some action you wanted to take to prevent this error. Otherwise you can close the issue.

  2. Thanks Eric: will look.

Loading...