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

pantsbuild / pants / 19617001874 / 9
80%
main: 80%

Build:
DEFAULT BRANCH: main
Ran 23 Nov 2025 09:38PM UTC
Files 1183
Run time 36s
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

23 Nov 2025 08:42PM UTC coverage: 40.772%. Remained the same
19617001874.9

push

github

web-flow
[pants_ng] Next-gen options reader. (#22880)

#22862 implemented NG config. 

This PR adds support for env vars and flags, and pulls them
all together into a new `OptionsReader`.

In practice this re-uses a lot of code from the current options crate:
- The new `OptionsReader` just wraps a current `OptionParser`, but
   skips the latter's complicated bootstrapping dance.
- Env support is directly taken from the existing code.
- Flag support is reimplemented, as NG flags are handled differently.

The difference in flag handling is quite important. Currently flags
have ambiguity: given `--foo-bar-baz`, is this setting a global option
`foo_bar_baz`, or an option `bar_baz` in scope `foo`, or an option 
`baz` in scope `foo-bar`? So the existing code has to iterate
over all flags and see if they match what we're looking for.

New flags use dashes in scope names, and to separate scope
names from option names, but the latter must use underscores as word
separators. So `--foo_bar_baz`, `--foo-bar_baz` and `--foo-bar_baz`
are unambiguous. Therefore we can simply look up flags by scope and
option name in nested HashMaps.

Nothing in this PR is wired up to anything yet, so this has no impact
on end users. It is speculative work to support future NG development.

24523 of 60147 relevant lines covered (40.77%)

0.41 hits per line

Source Files on job test_python_linux_x86_64_6/10 - 19617001874.9
  • Tree
  • List 1183
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 19617001874
  • 091bfc43 on github
  • Prev Job for on main (#19614241872.10)
  • Next Job for on main (#19617005008.10)
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

© 2025 Coveralls, Inc