Peiyu Wang got a fish trophy!

Ensure synthetic jar is always created (Argument list too long revisited)

Review Request #3003 - Created Oct. 20, 2015 and submitted

Information
Peiyu Wang
pants
2407
e55fb28...
Reviewers
pants-reviews
jsirois, mateor, patricklaw, stuhood

https://rbcommons.com/s/twitter/r/2672/ introduced a synthetic that includes original classpath in its manifest, as a workaround for platform limitation: argument too long.

It however wasn't properly triggered because it expects OSError which was wrapped and rethrown by Executor as Executor.Error.

This review makes the following changes

  • Use this all time not just on failures, reasoning is prefer one code path rather than two. As you can see, unit test is a lot easier.
  • One issue with creating synthetic jar all time is user code may invoke different classLoader that interpret embedded Class-Path differently, because of this, we disabled synthetic jar for scala repl and nailgun (no benefit anyway)
  • 2nd issue is previously creating synthetic jar is rare so it was left in a temp directory uncleaned. Now we either clean it up or if caller supplies a directory will save to that directory users can rerun the cmdline if they want to.
  • In manifest change from absolute classpath to relative path, to follow the spec, java classLoader is ok with absolute path, but as we discovered some user code doesn't like this one

https://travis-ci.org/peiyuwang/pants/builds/86456089

Also tetsed in CI/linux on twitter repo, a due diligence we missed last time.

Issues

  • 0
  • 1
  • 1
  • 2
Description From Last Updated
Stu Hood
Mateo Rodriguez
Stu Hood
Peiyu Wang
Peiyu Wang
Stu Hood
Peiyu Wang
Review request changed

Status: Closed (submitted)

Change Summary:

Merged again as 2e25c2cf531b380ae06e475636f2331e53f0a2fe

Loading...