normalize filespec exclude usage

Review Request #4348 — Created Nov. 2, 2016 and submitted

nhoward_tw
pants
3795, 4018
pants-reviews
benjyw, stuhood, yujiec
Sometimes we use exclude and sometimes we use excludes. It looks like there might be bugs do to that.

This patch ensures all of the glob and filespec related exclude names use exclude and not excludes.

Wrote a couple regression tests for the only bug I saw remaining and made them pass.

YU
  1. I vaguely recall that there are usages of "excludes" in several BUILD files in OSS pants (testprojects/, examples/, etc). You may want to clean them up or some tests may fail.

    1. This is only for globs. We also have a kwarg called excludes for jar_library which works differently. The test failures in CI are due to error message changes. We already disallow excludes in BUILD files in that globs raise on unknown kwargs: https://github.com/pantsbuild/pants/blob/master/src/python/pants/source/wrapped_globs.py#L153-L158

    2. Ah right. What used in BUILD file is already "exclude". Sorry for the wrong advice. It's great that you caught the bug in fs.py where it tries to use key "excludes" but should be "exclude". Making everything be "exclude" looks much better!

  2. 
      
YU
  1. Ship It!
  2. 
      
NH
WI
  1. In description: bugs *due* to that.

  2. 
      
NH
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as https://github.com/pantsbuild/pants/commit/2b6e0639465a95918c53f95910b1961245252804
Loading...