Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relativize the classpaths that are recorded during a JVM compile (#5139)
### Problem Currently, when we record classpaths during JVM compiles, we are recording the absolute paths. This is violating the idea that all builds are relatively homogenous. Additionally, if there is additional caching of jars, the absolute classpaths could cause unnecessary misses. ### Solution The solution is to relativize the classpaths. ### Result Instead of ``` /var/lib/mesos/slaves/a3942c64-03ad-4d95-80d7-767c6ba796c5-S7111/hashed-run/workspace/pants/.pants.d/compile/zinc/27609ddd7aa2/target/current/classes /var/lib/mesos/slaves/a3942c64-03ad-4d95-80d7-767c6ba796c5-S7111/hashed-run/workspace/pants/.pants.d/ivy/jars/org.apache.thrift/libthrift/jars/libthrift-0.5.0-5.jar ``` The file contains relative classpaths to the pants global workdir (ie .pants.d). For instance ``` compile/zinc/27609ddd7aa2/target/current/classes ivy/jars/org.apache.thrift/libthrift/jars/libthrift-0.5.0-5.jar ```
- Loading branch information