quaint-telephone-89068
11/11/2022, 3:53 AMPYTHONPATH. Pants links the generated code from the sandbox via the PYTHONPATH, but if it replicates/preserves the semantics of Python, the interpreter may first look in a file tree with the parent module structure but without the generated files, leading to an import error.
I've included a minimal example below that demonstrates the issue and works around it by nesting the source root under a src/ prefix.
Pants version
2.14.0
OS
MacOS
Additional info
pants-codegen-repro.tar.gz
pantsbuild/pantsuser
11/26/2022, 12:44 AMuser
11/26/2022, 12:44 AM