pants: Survive targets without derivations

Review Request #1066 - Created Sept. 22, 2014 and submitted

Information
Stu Hood
pants
a2625d5...
Reviewers
pants-reviews
areitz, benjyw, jsirois

Walks the full derivation chain for a target (which in the case of a particular target type at Twitter will be 3 entries long.)

Rather than:

Exception caught:
  File "src/python/pants/bin/pants_exe.py", line 205, in <module>
    main()
  File "src/python/pants/bin/pants_exe.py", line 200, in main
    _run()
  File "src/python/pants/bin/pants_exe.py", line 181, in _run
    result = command.run(lock)
  File "src/python/pants/commands/goal_runner.py", line 295, in run
    return engine.execute(context, self.goals)
  File "src/python/pants/engine/engine.py", line 48, in execute
    self.attempt(context, goals)
  File "src/python/pants/engine/round_engine.py", line 184, in attempt
    goal_executor.attempt(explain)
  File "src/python/pants/engine/round_engine.py", line 42, in attempt
    task.execute()
  File "src/python/pants/backend/jvm/tasks/jar_publish.py", line 523, in execute
    self.check_targets(exported_targets)
  File "src/python/pants/backend/jvm/tasks/jar_publish.py", line 760, in check_targets
    derived_target = derived_by_target[invalid_target]

Exception message: ScalaLibrary(SyntheticAddress(.pants.d/gen/scrooge/scrooge/scala-finagle:.pants.d.gen.idl-extract.3rdparty.jvm.com.twitter.<snip>))

...you get:

FAILURE: The following errors must be resolved to publish.
  Cannot publish BuildFileAddress(x/y/src/main/scala/BUILD, scala) due to:
    SyntheticAddress(.pants.d/gen/idl-extract/3rdparty.jvm.com.twitter.<snip>) - Does not provide a binary artifact.

Issues

  • 0
  • 0
  • 1
  • 1
Description From Last Updated
Ity Kaul
Stu Hood
Stu Hood
John Sirois
Patrick Lawson
Stu Hood
Patrick Lawson
Patrick Lawson
Stu Hood
Review request changed

Status: Closed (submitted)

Loading...