Does anyone know how to get the `clang-format` bin...
# general
q
Does anyone know how to get the
clang-format
binary used by the
pants.backend.experimental.cc.lint.clangformat
backend to export to
dist/export
? I used to have this working in version < 2.16 where
pants export ::
would pick it up, but I think some things changed particularly with resolves, and now I'm not sure how to configure it.
c
I think
pants export ::
no longer exports all tools. I think you'd need to export the resolve it's in by name. I'm not sure what the resolve is off hand (I'm guessing
clangformat
), but you can list resolves with
pants generate-lockfiles --resolve=
. You can then export it with
pants export --resolve=clangformat
q
thanks for replying - I don't think the clangformat used by the
pants.backend.experimental.cc.lint.clangformat
backend gets turned into a resolve, it doesn't show up in the list. there is a lock-file here though: https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/cc/lint/clangformat/clangformat.lock
for now, I just made a python_requirement out of that version of clang format which gets put into the python-default resolve and can export it that way
c
huh, yeah, I had forgotten that I had set up resolves for the tools I needed to export. Lemme look into that.