https://pantsbuild.org/ logo
f

fresh-cat-90827

01/10/2023, 7:01 AM
Working with the options semantics for the JSON schema of our
pants.toml
file. Is there any special case where an option that represents a collection won't be supporting the following types 🧵
The arrays can be: • a string (that follows a particular syntax):
Copy code
[pytest]
extra_requirements = "+['pytest-vcr']"
• an array:
Copy code
[pytest]
extra_requirements = ["pytest-vcr"]
• an object (with keys being only
add
or
remove
):
Copy code
[pytest]
extra_requirements.add = ["pytest-vcr"]
E.g. https://www.pantsbuild.org/docs/reference-pytest#extra_requirements
b

bitter-ability-32190

01/10/2023, 11:19 AM
Just FWIW I don't think we have to catch and solve everything from the getgo.
But maybe go look at the options loading tests?
f

fresh-cat-90827

01/10/2023, 11:22 AM
sorry, which one do you refer to?
c

curved-television-6568

01/10/2023, 12:15 PM
I think this is what @bitter-ability-32190 is suggesting as a good start to get some answers: https://github.com/pantsbuild/pants/blob/0dec547a656617ab0f7f847d04e6c19cfae2076e/src/python/pants/option/options_test.py
🙌 1
f

fresh-cat-90827

01/10/2023, 12:53 PM
ah you mean this, thanks!