fierce-fall-70380
02/04/2025, 6:39 PMfierce-fall-70380
02/04/2025, 6:47 PM13:28:57.24 [WARN] Pants cannot infer owners for the following imports in the target fooserv/itest_fooserv/fooserv_itest_helper.py:
* email_first (line: 50)
If you do not expect an import to be inferrable, add `# pants: no-infer-dep` to the import line. Otherwise, see <https://www.pantsbuild.org/2.24/docs/using-pants/troubleshooting-common-issues#import-errors-and-missing-dependencies> for common problems.
Here are the imports on line 50:
from web import email_first, login, mfa
Note:
ACAM-M-RWLH: acam$ pants list fooserv/web/email_first.py fooserv/web/login.py fooserv/web/mfa.py
fooserv/web/email_first.py
fooserv/web/login.py
fooserv/web/mfa.py
ACAM-M-RWLH: acam$
I've confirmed the contents of email_first.py don't matter (I still get the inference error if I replace it with a zero byte file). There are also no other modules with the same name over the whole monorepo.microscopic-knife-5995
02/04/2025, 6:58 PM__init__.py ? That might fix it...fierce-fall-70380
02/04/2025, 7:10 PMweb/__init__.py ...microscopic-knife-5995
02/04/2025, 7:12 PM-ldebug --keep-sandboxes=always to see if that gives any insight?fierce-fall-70380
02/04/2025, 7:14 PM--keep-sandboxes work when using just the pants binary / scie-pants? Or do you have to run it from the git repo for that to work? I've tried that option before but never received any output confirming the sandbox would be kept or where it's located.microscopic-knife-5995
02/04/2025, 7:15 PMfierce-fall-70380
02/04/2025, 7:16 PM-from web import email_first, login, mfa
+from web import logo, email_first, login, mfa
15:14:05.54 [WARN] Pants cannot infer owners for the following imports in the target fooserv/itest_fooserv/fooserv_itest_helper.py:
* logo (line: 50)
If you do not expect an import to be inferrable, add `# pants: no-infer-dep` to the import line. Otherwise, see <https://www.pantsbuild.org/2.24/docs/using-pants/troubleshooting-common-issues#import-errors-and-missing-dependencies> for common problems.
This really smells like a bug ...microscopic-knife-5995
02/04/2025, 7:17 PMfrom fooserv.web import logofierce-fall-70380
02/04/2025, 7:17 PM/ is not a source root.fierce-fall-70380
02/04/2025, 7:18 PMmfa instead:
-from web import email_first, login, mfa
+from web import mfa, email_first, login
🤔microscopic-knife-5995
02/04/2025, 7:19 PMfierce-fall-70380
02/04/2025, 7:19 PMfrom web import login, mfa works without error!fierce-fall-70380
02/04/2025, 7:24 PMfierce-fall-70380
02/04/2025, 8:07 PMweb imports line closer to the top of the import statements, I don't get the inference error. That definitely seems like a bug.fierce-fall-70380
02/04/2025, 8:17 PMMaybe tryAccording to the docs, when you run withto see if that gives any insight?-ldebug --keep-sandboxes=always
--keep-sandboxes you are supposed to see a message like:
21:26:13.55 [INFO] preserving local process execution dir `"/private/var/folders/hm/qjjq4w3n0fsb07kp5bxbn8rw0000gn/T/process-executionQgIOjb"` for "Run isort on 1 file."
That message is never printed for me when using the pants dependents goal, though.happy-kitchen-89482
02/05/2025, 1:18 AM--keep-sandboxes should always work, and log the locations of the sandboxes to the consolehappy-kitchen-89482
02/05/2025, 1:19 AMpants dependents doesn’t run any subprocesses, so there are no sandboxes to speak ofhappy-kitchen-89482
02/05/2025, 1:21 AMhappy-kitchen-89482
02/05/2025, 1:21 AMfooserv/ is your package root? so that web is a top-level package?happy-kitchen-89482
02/05/2025, 1:23 AMhappy-kitchen-89482
02/05/2025, 1:23 AMfierce-fall-70380
02/05/2025, 1:39 AMfierce-fall-70380
02/05/2025, 2:36 AM