hundreds-carpet-28072
08/23/2024, 2:29 PMpants package
validate internal dependencies? I have a scenario of:
> ls
projA/
dir/
main.py
projB/
dir/
tools.py
> cat projA/dir/main.py
import projB.dir.tools as tools
<rest of script>
Now projB/dir/tools.py
has been deleted so this import will fail but a pants package projA::
succeeds in building the related pex_binary
. Is this expected behaviour?square-psychiatrist-19087
08/23/2024, 4:25 PMunowned_dependency_behavior = "warn"
so pants will show a warning when the import couldn't be resolved and successfully build a pexhundreds-carpet-28072
08/23/2024, 4:40 PMprojB.dir.tools
isn’t a dependency that could be owned, that namespace is actually invalid as the file it points to has been deleted. Should that not cause an ImportError?square-psychiatrist-19087
08/23/2024, 4:41 PMhundreds-carpet-28072
08/23/2024, 4:43 PMpants package
- does package
not validate dependencies like this?square-psychiatrist-19087
08/23/2024, 4:44 PMfiles
or resources
or docker_image
, all these can be dependencies. There is no validation or special treatment of python dependenciescareful-address-89803
08/25/2024, 2:48 AMunowned_dependency_behavior=error
if you want it to throw an error.
From the perspective of the internals, projB.dir.tool
isn't "unownable" as it could be a valid packagehundreds-carpet-28072
08/27/2024, 9:22 AMpants package
would be installing it if it were a valid package and this would have opportunity to vaildate/fail?square-psychiatrist-19087
08/27/2024, 10:22 AMpants package
doesn't install anythinghundreds-carpet-28072
08/27/2024, 10:41 AMprojB.dir.tools
?square-psychiatrist-19087
08/27/2024, 10:44 AMunowned_dependency_behavior
to errorhundreds-carpet-28072
08/27/2024, 10:50 AMhundreds-carpet-28072
08/27/2024, 10:50 AM