<#21405 .add in ~/.pants.rc causes native options ...
# github-notifications
c
#21405 .add in ~/.pants.rc causes native options parse difference (duplicate values) Issue created by cburroughs Describe the bug Using https://github.com/pantsbuild/example-docker with Pants 2.22.0
Copy code
$ cat ~/.pants.rc
[docker]
tools.add = ["getent"]
Copy code
$ pants test ::
16:08:45.98 [INFO] waiting for pantsd to start...
16:08:47.40 [INFO] pantsd started
16:08:48.37 [INFO] Initializing scheduler...
16:08:48.41 [INFO] Initializing Nailgun pool for 8 processes...
16:08:52.99 [INFO] Scheduler initialized.
16:08:53.19 [WARN] Found differences between the new native options parser and the legacy options parser in scope [docker]:

- Value mismatch for the option `tools`:
    Legacy value: ['getent'] of type <class 'list'>, from source CONFIG
    Native value: ['getent', 'getent'] of type <class 'list'>, from source CONFIG

If you can't resolve this discrepancy, please reach out to the Pants development team: <https://www.pantsbuild.org//community/getting-help>.

The native parser will become the default in 2.23.x, and the legacy parser will be removed in 2.24.x. So it is imperative that we find out about any discrepancies during this transition period.

You can use the global native_options_validation option (<https://www.pantsbuild.org/2.22/reference/global-options#native_options_validation>) to configure this check.

Note that there is a known issue with differences in the handling of backslash escapes in config values of type list-of-string. This surfaces as, for instance, legacy value `['"example"']` and native value `['\"example\"']`. The solution to this issue will be to change the escaping in your config values appropriately when switching to 2.23.x. Typically this will mean removing superfluous escapes, and the new behavior will be more ergonomic.
⠄ 0.69s Find interpreter for constraints: CPython==3.8.*
Pants version 2.22.0 OS Linux pantsbuild/pants