Skip to content

--changed-dependents=transitive does not detect Python dependents after files are deleted #23240

@bonauer-pf

Description

@bonauer-pf

Describe the bug

  • have foo.py and foo_test.py in the repo, with the test importing the foo module
  • delete foo.py
  • run pants --changed-since=main --changed-dependents=transitive check

Expected behavior:

  • type checking should run on foo_test.py and should fail due to the unknown import of foo

Actual behavior:

  • pants prints a warning about being unable to infer the dependencies of the foo import, but the check goal succeeds

The same problem applies to pants test: I expect foo_test.py to be executed, but it is not.

Pants version
2.31.0.dev3 with the pants.backend.experimental.python.typecheck.pyright backend

OS
tested on Linux

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions