I'm trying to understand if I understand source ro...
# general
b
I'm trying to understand if I understand source roots correctly. Here's my project structure: root |--- projA |----------setup.py |----------src/projA |---------------------main.py |---------------------example.json |----------tests |---------------unit/ |---------------integration/ For this, I have the following source roots:
Copy code
[source]
root_patterns = [
    "/",
    "src/",
    "tests/",
]
Now this works. Going forward, there'll be projB, projC added with a similar structure. Now when I try to run something, e.g.
pants test projA/tests::
. it runs fine. However, if I remove the
/
root patterns, running the same gets me
No source root for projA
. With this setup, do I need those three root patterns? Is there a better approach?
b
Sorry for the trouble. We'll be able to help you better if you can create a reduced reproducer, e.g. just one project with one file in
src/projA
and one in
tests/
.