• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 6755 / 3
0%
main: 93%

Build:
Build:
LAST BUILD BRANCH: test_pants_with_uv_lockfiles
DEFAULT BRANCH: main
Ran 09 Sep 2015 04:53AM UTC
Files 387
Run time 10s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Sep 2015 04:47AM UTC coverage: 71.413% (-0.05%) from 71.465%
CI_FLAGS="-fkmsrcn -u 1/2 'Unit tests for pants and pants-plugins - shard 2'"

push

travis-ci

jsirois
Introduce anonymous targets built by macros.

This change introduces a new `TargetMacro.Factory` type whose instances
are accepted in the `BuildFileAliases` "targets" slot that can restrict
targets to only being contructed via the context aware object factory
interface, aka: BUILD file target macros.  This allows a target author to
be more restrictive with a target's arguments.  Two cases are immediately
important:

1. Enforcing 1:1:1
   This requires taking away the ability of the BUILD file author to
   specify a target name to ensure each BUILD file can have only 1
   target.  Since name is integral to Target capture, only a macro can
   do this.
2. Enforcing no dependencies
   The need to do this at all should go away when BuildGraph handling of
   non-Target Addressables is supported; but, until then, dependencies
   is another low-level property of Targets that cannot otherwise be
   blocked from population by BUILD file authors.

In the course of adding support for anonymous targets, the limits of the
existing system of carrying around type alias metadata in
BuildFileAddress were reached, and so this attribute was re-plumbed
through the Addressable proxies and into Target directly, allowing
macros to specify the alias for anonymous targets they create.

Finally, the BuildFileTargetFactory was lifted up as a small interface to
abstract the role both macros and target proxies serve in SourceRoot
specification and an explicit Macro type was introduced to allow for
macros to back restricted source roots.

Testing Done:
The contrib/go/examples BUILD tree was regenerated with the updated
`GoBuildgen` task via:
`$ ./pants buildgen.go --materialize --remote contrib/go/examples::`

CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/79408257

Bugs closed: 2019, 2123

Reviewed at https://rbcommons.com/s/twitter/r/2759/

16645 of 23308 relevant lines covered (71.41%)

0.71 hits per line

Source Files on job 6755.3 (CI_FLAGS="-fkmsrcn -u 1/2 'Unit tests for pants and pants-plugins - shard 2'")
  • Tree
  • List 0
  • Changed 10
  • Source Changed 10
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 6755
  • Travis Job 6755.3
  • 71462da0 on github
  • Prev Job for CI_FLAGS="-fkmsrcn -u 1/2 'Unit tests for pants and pants-plugins - shard 2'" on master (#6752.3)
  • Next Job for CI_FLAGS="-fkmsrcn -u 1/2 'Unit tests for pants and pants-plugins - shard 2'" on master (#6765.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc