Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Problem The git commit hook (and CI lint) will lint targets that own changed files. Transforming specs to single addresses is currently broken and causes a "did you mean error" to be thrown on specs that actually exist in an affected build file: ``` ResolveError: "main_py2" was not found in namespace "testprojects/src/python/interpreter_selection/python_3_selection_testing". Did you mean one of: :lib_py2 :lib_py23 :lib_py3 :main_py2 :main_py23 :main_py3 :test_py2 :test_py23 ``` This manifested after trying to make changes to a `testprojects` BUILD file, which is excluded in the CI/commit hook lint step: `./pants -q --exclude-target-regexp='testprojects/.*' --changed-parent=master lint` ### Solution Edit build_files.py to aggregate excluded addresses in addition to included ones and check that excluded addresses align with exclude logic so that the "did you mean" error only occurs when the spec actually doesn't exist. ### Result Changes to files in testprojects will not throw any "did you mean" errors in CI/commit hook lint invoked by the following command: `./pants -q --exclude-target-regexp='testprojects/.*' --changed-parent=master lint`
- Loading branch information