Skip to content

pants --changed-since treats any changes to a BUILD file as affecting all targets in that BUILD file #23307

@mattalbr

Description

@mattalbr

Describe the bug

$ git checkout dev
$ pants --changed-since=dev list
<empty, obviously>

then I modify whitespace in my file backend/BUILD (literally just remove an empty line)

pants --changed-since=dev list
<every target in backend/BUILD>

Pants version
2.31.0

OS
Docker on MacOS

Additional info
Obviously parsing the changes to the BUILD file is much harder than just looking at file-level changes, but IMO it's a bug to treat unaffected targets in the same BUILD file as affected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions