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

pantsbuild / pants / 19050398641

03 Nov 2025 09:48PM UTC coverage: 80.3% (-0.003%) from 80.303%
19050398641

push

github

web-flow
A new "pants next-gen" command-line parser. (#22808)

This supports the command/subcommand paradigm, rather than
the "list of goals" paradigm of the existing cli parser.

This is experimental, not wired up to anything yet, and intended to
support a hypothetical "next-generation Pants" (pants_ng for short).

It is not intended to replicate all current Pants CLI nuances, but is a
much simpler design based on our experience with the complexities
of the current CLI parser.

In particular,  this new CLI parser does not need to know in advance 
about any registered goals and options. The old parser needed this
to tell the difference between specs and goals, and this added a
lot of complexity for little gain. This was also ambiguous, since
introduction of a new goal could change the meaning of an existing
invocation.

This parser instead *requires* specs to contain a filepath separator,
anything else is a flag or a command or a subcommand, and those
are easily distinguished by syntax alone. A spec path in the root dir
can be prefixed with `./` to meet this requirement.

This parser supports multiple cmd/subcommand pairs, each with 
flags, by separating them with a standalone `+` character. This,
again, removes ambiguity.

This parser supports only long flags (prefixed by `--`). We currently
support a handful of short flags (such as `-l`), but those cause
ambiguity since we also use a single dash prefix for negating
specs.

See https://github.com/pantsbuild/pants/discussions/22692 for context.

77992 of 97126 relevant lines covered (80.3%)

3.35 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

34.97
/src/python/pants/engine/internals/graph.py


Source Not Available

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