quaint-telephone-89068
10/26/2022, 12:47 AMpython-infer.imports
subsystem and run ./pants dependencies <some-empty-file>
we get a dependencies that should not be there. The behavior seems to mark sources in the same target (e.g. python_sources
) as dependencies of each other.
When creating more granular sources (e.g. python_source
) it does not output any dependencies which is expected.
Pants version
2.8 (upgrading from 2.7)
OS
Both MacOS / Linux
Additional info
How to reproduce
$ ./pants dependencies src/python/pants/base/hash_utils.py
src/python/pants/util/ordered_set.py
src/python/pants/util/strutil.py
$ ./pants --python-infer-imports=False dependencies src/python/pants/base/hash_utils.py
src/python/pants/base/__init__.py
src/python/pants/base/build_environment.py
src/python/pants/base/build_root.py
src/python/pants/base/deprecated.py
src/python/pants/base/exception_sink.py
src/python/pants/base/exceptions.py
src/python/pants/base/exiter.py
src/python/pants/base/glob_match_error_behavior.py
src/python/pants/base/parse_context.py
src/python/pants/base/specs.py
src/python/pants/base/specs_parser.py
Example branch
https://github.com/njgrisafi/pants-example/tree/dep-inf-2.8
Run ./pants dependencies app/module_1/api.py
(an empty file) and confirm it has dependencies.
Run ./pants dependees app/module_1/api.py
(unused) and confirm is has dependees.
pantsbuild/pants