hundreds-father-404
03/04/2022, 5:17 PM./pants check
be able to run directly on a protobuf_source
target to check that it compiles to Go & Java/Scala?go_package
depends on the generated code, it will get compiled as a precursor
• We don't have ./pants check
run directly on third-party packages for Go. You have to compile by depending on it in a go_package
. We didn't like the UX of ./pants check path/to/go.mod
resulting in compiling every single thing because most packages aren't consumed
• reminder that you can use ./pants export-codegen
to check already that Protoc spits out files. Technically those files might not be compileable tho
It would require some rework of FieldSets to get this working. But for now only trying to figure out what is optimal designwitty-crayon-22786
03/04/2022, 5:21 PMhundreds-father-404
03/04/2022, 5:21 PMwitty-crayon-22786
03/04/2022, 5:21 PMFieldSet.is_applicable(target, union_membership)
would check whether sources fields could be converted.hundreds-father-404
03/04/2022, 5:25 PMUnionMembership
is an interesting idea. That's indeed very similar to how I'm doing this for Go's plugin hookhappy-kitchen-89482
03/04/2022, 7:36 PMUX question: should ./pants check be able to run directly on a protobuf_source target to check that it compiles to Go & Java/Scala?I think yes! But not urgent