Print a diagnostic if a BUILD file references a source file that does not exist

Review Request #1198 - Created Oct. 22, 2014 and submitted

Information
Eric Ayers
pants
813fecf...
Reviewers
patricklaw

Print a diagnostic if a BUILD file references a source file that does not exist

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
Patrick Lawson
Eric Ayers
Review request changed

Status: Closed (submitted)

Change Summary:

commit 4456b0cc0b57b90068a93833923e194a4f1ccbea
Loading...