Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B buck
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 201
    • Issues 201
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • buck
  • Merge requests
  • !144

Improve error messages when build target parse preconditions fail

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/dpursehouse/precondition-failed-error-message into master Jun 26, 2014
  • Overview 7
  • Commits 1
  • Pipelines 0
  • Changes 1

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:

  1. 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, )

  2. Observe the error message:

    java.lang.IllegalArgumentException: ':easymock' must start with '//'

  3. Don't spend ages tearing out hair trying to figure out where the error is coming from.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/dpursehouse/precondition-failed-error-message