Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Print a diagnostic if a BUILD file references a source file that does…
… not exist Testing Done: Edited a BUILD file, added a reference to a source file that does not exist. ``` diff --git a/src/python/pants/backend/core/BUILD b/src/python/pants/backend/core/BUILD index 2da9682..8b1e827 100644 --- a/src/python/pants/backend/core/BUILD +++ b/src/python/pants/backend/core/BUILD @@ -4,7 +4,7 @@ python_library( name = 'plugin', - sources = ['register.py'], + sources = ['register.py', 'does-not-exist.py'], dependencies = [ 'src/python/pants/backend/core/targets:all', 'src/python/pants/backend/core/tasks:all', ``` Before this change, when running ``` PANTS_DEV=1 goal test tests/python/pants_test:all ``` the build would end with an error but not give any further information: ``` Exception message: [Errno 2] No such file or directory ``` After this change, you now get a diagnostic message that gives you a hint why the test failed: ``` ERROR] Failed to copy src/python/pants/backend/core/does-not-exist.py for library PythonLibrary(BuildFileAddress(/Users/zundel/Src/pants/src/python/pants/backend/core/BUILD, plugin)) FAILURE Exception message: [Errno 2] No such file or directory ``` Reviewed at https://rbcommons.com/s/twitter/r/1198/
- Loading branch information