Skip to content

Gazelle should use buildifier differ correctly or not at all #342

@jayconrod

Description

@jayconrod

This issue is based on a performance issue mentioned in #335.

When Gazelle is invoked with -mode diff, it runs a command provided by github.com/bazelbuild/buildifier/differ. The differ package is supposed to provide different commands and different ways of invoking them, depending on whether a graphical diff tool is available and whether multi-diff is supported.

Gazelle incorrectly assumes multi-diff is not supported. It calls Differ.Show for each BUILD file without ever calling Differ.Run. This causes it to build a command line without actually running it.

I'm not actually sure a graphical diff is expected behavior for Gazelle. If it is not, we should just invoke diff directly without using the differ package. If it is, then we should call the Run method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions