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

pantsbuild / pants / 19617001874
80%

Build:
DEFAULT BRANCH: main
Ran 23 Nov 2025 09:10PM UTC
Jobs 12
Files 1728
Run time 3min
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: 80.288% (-0.002%) from 80.29%
19617001874

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.

78386 of 97631 relevant lines covered (80.29%)

3.36 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
87.69
-3.08% src/python/pants/pantsd/lock_test.py
Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_7/10 - 19617001874.1 23 Nov 2025 09:36PM UTC 1192
42.53
GitHub Action Run
2 test_python_linux_arm64 - 19617001874.2 23 Nov 2025 09:10PM UTC 1170
43.08
GitHub Action Run
3 test_python_linux_x86_64_2/10 - 19617001874.3 23 Nov 2025 09:27PM UTC 1188
46.74
GitHub Action Run
4 test_python_linux_x86_64_1/10 - 19617001874.4 23 Nov 2025 09:30PM UTC 1186
40.2
GitHub Action Run
5 test_python_linux_x86_64_4/10 - 19617001874.5 23 Nov 2025 09:37PM UTC 1219
49.8
GitHub Action Run
6 test_python_linux_x86_64_5/10 - 19617001874.6 23 Nov 2025 09:26PM UTC 1201
49.17
GitHub Action Run
7 test_python_linux_x86_64_3/10 - 19617001874.7 23 Nov 2025 09:31PM UTC 1185
45.52
GitHub Action Run
8 test_python_macos14_arm64 - 19617001874.8 23 Nov 2025 09:10PM UTC 1170
43.09
GitHub Action Run
9 test_python_linux_x86_64_6/10 - 19617001874.9 23 Nov 2025 09:25PM UTC 1183
40.77
GitHub Action Run
10 test_python_linux_x86_64_9/10 - 19617001874.10 23 Nov 2025 09:25PM UTC 1193
44.9
GitHub Action Run
11 test_python_linux_x86_64_8/10 - 19617001874.11 23 Nov 2025 09:33PM UTC 1188
45.25
GitHub Action Run
12 test_python_linux_x86_64_0/10 - 19617001874.12 23 Nov 2025 09:29PM UTC 1207
46.82
GitHub Action Run
Source Files on build 19617001874
  • Tree
  • List 1728
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #19617001874
  • 091bfc43 on github
  • Prev Build on main (#19614241872)
  • Next Build on main (#19617005008)
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