https://pantsbuild.org/ logo
#development
Title
# development
b

bitter-ability-32190

08/28/2022, 12:51 AM
From the build failure in https://github.com/pantsbuild/pants/pull/16666 it seems like
FilespecMatcher.matches
is case-insensitive. Is that expected?
1
Yeah, I don't think this is ideal...
Copy code
$ git diff
diff --git a/src/python/pants/source/filespec_test.py b/src/python/pants/source/filespec_test.py
index 168d619dd..652d8d517 100644
--- a/src/python/pants/source/filespec_test.py
+++ b/src/python/pants/source/filespec_test.py
@@ -90,6 +90,9 @@ def test_valid_matches(rule_runner: RuleRunner, glob: str, paths: Tuple[str, ...
         # Dirs.
         ("dist/", ("not_dist", "cdist", "dist.py", "dist/dist")),
         ("build-support/*.venv/", ("build-support/rbt.venv.but_actually_a_file",)),
+        # Case sensitivity
+        ("A", ("a",)),
+        ("a", ("A",)),
     ],
 )
 def test_invalid_matches(rule_runner: RuleRunner, glob: str, paths: Tuple[str, ...]) -> None:
Copy code
$ ./pants test src/python/pants/source/filespec_test.py -- -k invalid
...
E           AssertionError: assert not ('A',)

src/python/pants/source/filespec_test.py:26: AssertionError
Womp womp
MatchOptions::default()
returns
case_sensitive
false
because its a bool, whereas ``MatchOptions::new()` returns
true
.
1