Ability to filter list options.

Review Request #3997 - Created June 10, 2016 and submitted

Information
Benjy Weinberger
pants
Reviewers
pants-reviews
nhoward_tw, stuhood, zundel

Generalizes the "EXTEND" functionality of ListValueComponent to "MODIFY". Each ListValueComponent now stores a list of appends and a list of filters, and these get applied when the final val is requested.

Introduces two new forms of syntax for values of list options:

  1. -['foo', 'bar'] filters those values from the running list computation.
  2. ...,...,... splits the value on the commas and merges the results of evaluating the ....

The latter allows you to both append to and filter a list in, say, pants.ini:

list_option: -[1,2,3],+[4,5,6]

Added tests of the new syntax and functionality. All options tests pass. Full CI running here: http://jenkins.pantsbuild.org/job/pantsbuild/job/pants/branch/PR-3583/

Issues

  • 0
  • 4
  • 0
  • 4
Description From Last Updated
Yi Cheng
Yi Cheng
Eric Ayers
Benjy Weinberger
Benjy Weinberger
Eric Ayers
Nick Howard (Twitter)
Benjy Weinberger
Benjy Weinberger
Stu Hood
Benjy Weinberger
Eric Ayers
Benjy Weinberger
Nick Howard (Twitter)
Stu Hood
Benjy Weinberger
Review request changed

Status: Closed (submitted)

Change Summary:

a5c25d2b17740d449de3bb24780ad1b5d4e63f7f

Benjy Weinberger

Submited as a5c25d2b17740d449de3bb24780ad1b5d4e63f7f. Thanks all!

Loading...