Lazily load zinc analysis

Review Request #2827 - Created Sept. 15, 2015 and submitted

Information
Stu Hood
pants
47f9cdb...
Reviewers
pants-reviews
nhoward_tw, patricklaw

Rather than eagerly loading all upstream analysis, we now lazily load it when it is requested, and allow it to be unloaded when necessary. It looks like sbt was always designed to be used this way, but zinc was eagerly building a map to fill the getAnalysis function that the sbt compiler desires.

  • Lazily load zinc analysis upon usage, and allow it to be freed by never holding strong references to the entire Analysis object.
  • Remove the zinc -force-clean flag, since it is unused from pants' perspective, and supporting it required additional Analysis apis.
  • Move Cache class to a cache package.

cold compiles of large internal projects, and:

./pants test tests/python/pants_test/backend/jvm/tasks/jvm_compile/::

...with a locally published version.

Issues

  • 0
  • 6
  • 1
  • 7
Description From Last Updated
Patrick Lawson
Stu Hood
Qicheng Ma
Nick Howard (Twitter)
Sergey Serebryakov
Sergey Serebryakov
Stu Hood
Stu Hood
Nick Howard (Twitter)
Stu Hood
Nick Howard (Twitter)
Stu Hood
Stu Hood
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 5992baa489882c21218955b20a5638548711d9b9

Qicheng Ma
Ship It!
Loading...