I'm having trouble with pants, protobufs, and reso...
# general
b
I'm having trouble with pants, protobufs, and resolves. I was using pants v2.17 and protobufs were working fine. However, they did not support resolves. I upgraded to v2.20, and the resolves problem is solved. However, I now can't import proto files in other proto files:
Copy code
syntax = "proto3";

package package_a;

message MessageA {
  int32 value = 1;
}
Copy code
syntax = "proto3";

package package_b;

import "folder1/folder2/protos/someproto.proto";

message MessageB {
  package_a.MessageA value = 1;
}
This does not work. It complains that
folder1/folder2/protos/someproto.proto
, although it does. This was working fine before resolves. Any clues?
It looks like the problem is that now each proto has 3 resolves, and pants doesn't automatically link the right one. How do I tell it to use the same resolve across all protobufs?
FYI: it turns out it is easy to solve. Just add the imported protobufs as dependencies in the BUILD rules. The dependencies weren't needed before, but they seem to be necessary now
b
Sorry for the trouble! It sounds like dependency inference stopped working. Do you want to spend more time investigating this and try to get it working again, or are you happy with the solution you found?
h
Why are there 3 resolves in play?
Trying to understand the scenario
b
@broad-processor-92400: as long as something works, I'm happy 🙂 @happy-kitchen-89482: because of pytorch. We have one resolve for mac (dev machines), linux cpu (some dev machines and some prod machines), and linux gpu (inference service)
h
uuuuuuuuuuuugh pytorch... (shakes fist at sky)
b
Yup, torch is a pita