https://pantsbuild.org/ logo
w

wide-midnight-78598

05/22/2022, 12:07 AM
Are there any examples in the repo for lint plugins that are built from source (like a git tag?), rather than being pulled down pre-compiled?
βœ… 1
f

fast-nail-55400

05/22/2022, 12:22 AM
The go protobuf plugin builds the protobuf-go plugin from scratch. It isn’t a lint plugin but it is an example of a tool compiled by Pants.
πŸ‘ 1
w

wide-midnight-78598

05/22/2022, 12:33 AM
Ah, yes, this was what I was looking for... It seems to be exactly what I should have assumed it would have been πŸ™‚ I'm just wondering because for something like Swift, it's pretty normal to just pull down the git code and compile That looks pretty straightforward :)
f

fast-nail-55400

05/22/2022, 12:34 AM
You can probably just setup a
git
command in a
Process
.
w

wide-midnight-78598

05/22/2022, 12:35 AM
I mean, retrieving the source via git or just through Github's API - sure. Was more wondering about the compilation step
I hadn't yet seen that in the codebase
f

fast-nail-55400

05/22/2022, 12:36 AM
the go backend was the first compiled backend for v2 so it has some interesting design aspects. one is that we separated the compile rule from knowing anything about target types.
which allowed reusing it for compiling tools.
w

wide-midnight-78598

05/22/2022, 12:37 AM
This is probably how the cc backend should work too, in fact, almost has to
πŸ‘ 1
h

hundreds-father-404

05/23/2022, 2:15 PM
yeah I've really really liked that modeling of separating out compilation vs target metadata extraction
πŸ‘ 1