Make more glob usages lazy; Pass FilesetWithSpec through source field validation, Make BundleProps.filemap lazy

Review Request #3344 - Created Jan. 16, 2016 and submitted

Information
Nick Howard (Twitter)
pants
2794
Reviewers
pants-reviews
benjyw, jsirois, stuhood, zundel

One of the things that consumes a lot of time while parsing BUILD build files is loading the values of globs eagerly. Two of the places this happens are during sources field validation and generating the filemap for jvm app bundles.

This changes SourcesField so it allows FilesetWithSpec, ie globs, to be passed through without being converted into a list. This allows globs to remain unfulfilled until use rather than eagerly doing directory scanning on target initialization.

It also changes jvm_app's bundle so that its filemap is also lazily created rather than eagerly.

Added a test case for passthrough, ran ci.

Travis passed https://travis-ci.org/pantsbuild/pants/builds/103508419

Issues

  • 0
  • 2
  • 0
  • 2
Description From Last Updated
Benjy Weinberger
Nick Howard (Twitter)
Peiyu Wang
Nick Howard (Twitter)
Benjy Weinberger
Eric Ayers
Nick Howard (Twitter)
Eric Ayers
Nick Howard (Twitter)
Nick Howard (Twitter)
Review request changed

Status: Closed (submitted)

Change Summary:

https://github.com/pantsbuild/pants/commit/2463f3ad4f62c14a6cbf40e9eb8103e1bc67de64

Loading...