cool-easter-32542
03/07/2025, 5:35 PMpants_distdir global option in a pants.ci.toml which is applied with --pants-config-files in CI. We do not set pants_distdir in our pants.toml and use the default value.
In `pants.ci.toml`:
[GLOBAL]
pants_distdir = "%(buildroot)s/dist.docker"
We also include [stats] in pants.ci.toml like so:
[stats]
log = true
output_file = "%(pants_distdir)s/stats.jsonl"
format = "jsonlines"
Note that the output_file interpolates pants_distdir.
This results in the following mismatch between the legacy and native options parser:
pants --pants-config-files=pants.ci.toml list :: > /dev/null
- Value mismatch for the option `output_file`:
Legacy value: /Users/greg.niemann/Klaviyo/Repos/k-repo/dist.docker/stats.jsonl of type <class 'str'>, from source CONFIG
Native value: /Users/greg.niemann/Klaviyo/Repos/k-repo/dist/stats.jsonl of type <class 'str'>, from source CONFIG
As of 2.24.2, this results in the stats file being written to dist and not dist.docker.
Note that the specialized pants_distdir (dist.docker) is used correctly by everything else. It is only this option.
Pants version
Which version of Pants are you using?
2.24.2
OS
Are you encountering the bug on MacOS, Linux, or both?
Both
Additional info
Add any other information about the problem here, such as attachments or links to gists, if relevant.
pantsbuild/pants