Created by: dpursehouse
Summary:
When a build target pattern does not begin with '//', the build fails with the error:
java.lang.IllegalArgumentException: buildTargetPattern must start with //
Change this error message to include the name of the target that caused the failure, making it easier to find and fix it.
Also, add quote marks in appropriate places in the error messages.
Test Plan:
-
Build Gerrit containing a broken maven_jar definition
maven_jar( name = 'objenesis', id = 'org.objenesis:objenesis:1.2', sha1 = 'bfcb0539a071a4c5a30690388903ac48c0667f2a', license = 'DO_NOT_DISTRIBUTE', visibility = [':easymock', '//lib/powermock:powermock-reflect'], attach_source = False, )
-
Observe the error message:
java.lang.IllegalArgumentException: ':easymock' must start with '//'
-
Don't spend ages tearing out hair trying to figure out where the error is coming from.