Use target.id to create stable classpath

Review Request #3211 - Created Dec. 4, 2015 and submitted

Information
Peiyu Wang
pants
2664
69a6eea...
Reviewers
pants-reviews
patricklaw, stuhood

Today, for target a/b:b we create a symlink under a/b/b, current implementation
first delete everything under a/b/b, this is probalematic.

Consider target a/b:b and a/b/b/c:c whose stable classpath share the same
prefix: a/b/b

  1. a/b/b/c:c first creates a stable symlink a/b/b/c/c/0-z.jar
  2. a/b:b calls safe_rmtree('a/b/b') previous symlink will be deleted

The original intent to do rmtree my guess is to clear symlinks that already
exist during incremental build, but didn't consider targets may share share
common prefix.

This review
1. delete only non-directories under the current directory, not the entire tree
2. Provide an option to use target.id as the safe unique identifier.
Switch to use target.id for bundle, but continue to use the old naming
for export-classpath since it requires coordination of Intellij plugin.

Locally tested on a previously failing bundle

https://travis-ci.org/peiyuwang/pants/builds/95140740 passed

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Nick Howard (Twitter)
Stu Hood
Patrick Lawson
Peiyu Wang
Peiyu Wang
Peiyu Wang
Yi Cheng
Nick Howard (Twitter)
Peiyu Wang
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 923fa67d34d390bdd604e2682844268e68579357

Loading...