rapid-bird-79300
08/17/2023, 12:01 AMpants.backend.python.dependency_inference.rules.UnownedDependencyError: Pants cannot infer owners for the following imports in the target. However, there was no issue with this file/dependencies just simply renaming some files. Upon more investigate we discovered it's actually the pants cache causing this error. Generating a new cache from the branch or disabling it fixed the error.
I'm going to see if I can create minimal repro for this issue but wanted to report here first as the behavior is not expected.careful-address-89803
08/17/2023, 12:20 AMimport file0
and then you renamed file0.py -> file2.py.
And then it was saying that in file1.py it can't find the owner of file0 ?rapid-bird-79300
08/17/2023, 12:21 AMrapid-bird-79300
08/17/2023, 12:21 AMrapid-bird-79300
08/17/2023, 12:22 AMrapid-bird-79300
08/17/2023, 12:23 AMcareful-address-89803
08/17/2023, 12:31 AMcareful-address-89803
08/17/2023, 12:32 AMpants.backend.experimental.python backendrapid-bird-79300
08/17/2023, 12:32 AMrapid-bird-79300
08/17/2023, 12:32 AMrapid-bird-79300
08/17/2023, 12:33 AMambiguity_resolution = "by_source_root" so I wonder if a combination of these settings tripped up pantsrapid-bird-79300
08/17/2023, 12:50 AMrapid-bird-79300
08/17/2023, 12:50 AMbitter-ability-32190
08/17/2023, 1:05 AMrapid-bird-79300
08/17/2023, 1:22 AMbitter-ability-32190
08/17/2023, 1:22 AMrapid-bird-79300
08/17/2023, 1:23 AMbitter-ability-32190
08/17/2023, 1:24 AMrapid-bird-79300
08/17/2023, 1:24 AMrapid-bird-79300
08/17/2023, 1:25 AMrapid-bird-79300
08/17/2023, 1:28 AM./pants peek :: >> /dev/null
2. Remove [source] section from pants.toml
3. Run dependency inference ./pants peek :: >> /dev/null
You should see an error like
UnownedDependencyError: Pants cannot infer owners for the following imports in the target app/app.py:
* app.module_1.example (line: 1)rapid-bird-79300
08/17/2023, 1:28 AMbitter-ability-32190
08/17/2023, 1:29 AMrapid-bird-79300
08/17/2023, 1:30 AMrapid-bird-79300
08/17/2023, 1:44 AMpantsd totally fine, disabling pantsd falls back into that loop (writting issue now just formalizing repro steps)rapid-bird-79300
08/17/2023, 2:12 AMrapid-bird-79300
08/17/2023, 2:13 AMSimple reproduction section in the issue description. I created two branches with changes that should trigger the issue. Follow the steps and should be able to repro on your machinerapid-bird-79300
08/17/2023, 2:39 AM