bundle_create cleanup: merge internal-libs and libs

Review Request #3329 - Created Jan. 12, 2016 and submitted

Information
Peiyu Wang
pants
2793
3338
Reviewers
pants-reviews
nhoward_tw, patricklaw, stuhood, zundel

We recently introduced a change that splits fat jar into per target jars and
places them under internal-libs (https://rbcommons.com/s/twitter/r/3261/)

The issue that we didn't anticipate as we prepare the new release is there are
ad-hoc scripts that hardcode -cp libs/\* assuming all library jars are under
libs instead of using the monolithic jar with synthetic classpath.

Hopefully by merging internal-libs back to libs we will have less surprises
in the release.

Some implementation details:

  • merge code that creates external symlinks and internal symlinks into one,
    hopefully simplies some logic
  • to keep symlinks unique under libs, both external and internal jars follow
    the same naming style: prefixed with target.id, followed by a unique integer,
    this is for 1. unique-ness 2. cap the filename length. For example:

Was:

internal-libs/a.b.c-0.jar (target.id + index)
libs/com.google.guava-guava-18.0.jar (maven name)

Now:

libs/a.b.c-0.jar (target.id + index)
libs/3rdparty.guava-0.jar (also target.id + index)

Note: the other naming style for external jar considered is (target.id + maven name)
is easier for debugging, but has the risk of exceeding file name max length.

Sorry about this change, wish had realized this earlier!

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

Issues

  • 0
  • 4
  • 0
  • 4
Description From Last Updated
Eric Ayers
Peiyu Wang
Peiyu Wang
Peiyu Wang
Eric Ayers
Eric Ayers
Patrick Lawson
Stu Hood
Peiyu Wang
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as b808d8f7cbe45d82fbf5a6417d09c50d6fa5e130

Loading...