Hey, I have some weird behaviour of pants right no...
# general
b
Hey, I have some weird behaviour of pants right now. I enabled and formatted BUILD files with buildifier on a different branch yesterday and if I run
pants update-build-files --check
now. Pants tries to format everything with black again. But, if I run
pants help backends
it clearly shows, that buildifier is enabled and not black.
b
What’s the configuration of backends in
pants.toml
?
b
Copy code
[GLOBAL]
pants_version = "2.16.0"
backend_packages = [
    "pants.backend.build_files.fmt.buildifier",
    "pants.backend.docker",
    "pants.backend.docker.lint.hadolint",
    "pants.backend.experimental.helm",
    "pants.backend.python",
    "pants.backend.python.lint.isort",
    "pants.backend.shell",
    "pants.backend.shell.lint.shellcheck",
]
c
I think the update-build-files as a goal may be hardwired to use black..? (and deprecated, even if not marked as such) as build file formatting and checking is now part of fmt/lint goals with the proper backend enabled
b
You can disable the formatting in that goal: https://www.pantsbuild.org/docs/reference-update-build-files#fmt
The plan, I think, is still to slowly deprecate it in favor of `fix`/
fmt
. But for now, we're still split
b
The weird thing is, it worked yesterday with update-build-files to use buildifier
But update-build-files is going to be deprecated?
b
I suspect there's some overlap on what's allowed with
black
and
buildifier
And yes to the deprecation, at this point everything it does could reasonably be in `fmt`/`fix`
c
I think
pants.backend.build_files.fix.deprecations
is the backend doing what
update-build-files
does along with the various
pants.backend.build_files.fmt…
ones.
b
oh.... I guess I already did all the heavy work. We could just deprecate (with a long tail) 😅
👍 1