Don't modify globs excludes argument value.

Review Request #2841 - Created Sept. 17, 2015 and submitted

Nick Howard (Twitter)
dturner-tw, jsirois, molsen

Ideally, users shouldn't be using variables in BUILD files, but if they do, we shouldn't be modifying their values.

The error message that comes up is like this when the excludes value is reused as a sources list:

                   File ".../src/python/pants/base/", line 545, in create_sources_field
                     assert_list(sources, key_arg=key_arg)
                   File ".../src/python/pants/base/", line 49, in assert_list
                     .format(key_msg, expected_type, e, e.__class__))
                 ValueError: In key 'sources': Expected a list containing values of type (<type 'basestring'>,), instead got a value [''] of <type 'list'>

Wrote regression test, saw that it failed. Updated implementation and made it pass.


  • 1
  • 1
  • 0
  • 2
Description From Last Updated
If the only other type we expect here is a container with exactly one string type in it, we may ... Matt Olsen Matt Olsen
Nick Howard (Twitter)
Stu Hood
Patrick Lawson
Nick Howard (Twitter)
Matt Olsen
John Sirois
Nick Howard (Twitter)
John Sirois
Matt Olsen
David Turner
Nick Howard (Twitter)
Nick Howard (Twitter)
Review request changed

Status: Closed (submitted)

Change Summary: