r
message has been deleted
My try to put multiple protofiles paths into interaction. path1 - service file, path2 - message definitions.
m
at the moment I believe the full inclined proto must be provided. Is that right @uglyog?
r
I see that it includes a parent_dir I can copy the imports there but don't know where it is.
if the import path is
Copy code
import "<http://gitlab.com/elon/musk/hela/module/secure/pb/definition_modulerule.proto|gitlab.com/elon/musk/hela/module/secure/pb/definition_modulerule.proto>";
what will be parent_dir?
Ok, I succeeded. If any1 have similar problem, ping me. Basically you have to copy all the imported proto files into
~/.pact/plugins/protobuf-0.1.8/protoc
or into directory where the service.proto is (
Copy code
"pact:proto": "` + service.proto + `",
Remeber when the import look like this
Copy code
import "<http://gitlab.com/group/project/definitions.proto|gitlab.com/group/project/definitions.proto>";
then you have to copy it under
~/.pact/plugins/protobuf-0.1.8/protoc/gitlab.com/group/project/definitions.proto
or
./gitlab.com/group/project/definitions.proto
🤔 1
j
@Sri Swetha Somepalli fyi
u
Ok, that is surprising, but then it is just shelling out to protoc, so I guess that is how that behaves.
👍 1
m
Should we document this somewhere Ron?
maybe a troubleshooting/FAQ or something?
u
Ideally, it should behave without people needing to know that protoc is being used
👍 1
m
I more meant documenting the behaviour Robert mentioned above.
r
Ideally it would be great if we could just provide a custom import path config file :
/home/robert/.pact/plugins/protobuf-0.1.8/pact_plugin.json
Something like that:
Copy code
{
  "pluginInterfaceVersion": 1,
  "name": "protobuf",
  "version": "0.1.8",
  "executableType": "exec",
  "minimumRequiredVersion": null,
  "entryPoint": "pact-protobuf-plugin",
  "entryPoints": {},
  "dependencies": null,
  "pluginConfig": {
    "protocVersion": "3.19.1",
    "downloadUrl": "<https://github.com/protocolbuffers/protobuf/releases/download>",
    "imports": [
      "/home/robert/go/src"
    ]
  }
}
Then the protoc binary would execute with
Copy code
protoc -I /home/robert/go/src ... service.proto
That would simplify a lot the process cause right now I have to copy all the imports in this one path where service.proto is. @uglyog
s
Hi, Copied the protofiles into directory where the service.proto is (
Copy code
"pact:proto": "` + service.proto + `",
But, faced the below error
Stack trace.txt
u
Pact file does not contain any Protobuf descriptors
can you check the generated Pact file. That means there are no descriptors stored in the file.
s
I verified, It has not generated the pact file.
Here is the Manifest:
Copy code
{
  "manifestVersion": 1,
  "pluginInterfaceVersion": 1,
  "name": "protobuf",
  "version": "0.1.10",
  "executableType": "exec",
  "entryPoint": "pact-protobuf-plugin",
  "pluginConfig": {
    "protocVersion": "3.19.1",
    "downloadUrl": "<https://github.com/protocolbuffers/protobuf/releases/download>",
    "hostToBindTo": "127.0.0.1",
    "additionalIncludes": [
      "//Users/ssomepalli/Documents/chronos/ad-break-chronos/src/test/resources/grpc"
    ]
  }
}