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

Stu Hood
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.

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/'
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/'

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: 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.