Closed bernardnormier closed 1 year ago
One issue is that Google.Protobuf.Tools
doesn't include buildTransive
properties. Therefore, even if IceRpc.Protobuf.Tools
references the Google.Protobuf.Tools
package, the properties defined there – used to locate the protoc compiler and Protobuf well-known files – wouldn't be defined when the ProtoCompile
task runs in the user project that only references IceRpc.Protobuf.Tools
.
IceRpc.Protobuf.Tools already includes the required Google.Protobuf.dll
for IceRpc.ProtocGen.dll
. Similarly, we can bundle the protoc compiler and the Protobuf well-known files when we build the IceRpc.ProtocGen
package.
One thing I didn't realize before is that because we include Google.Protobuf.dll
we should update the LICENSE accordingly
Therefore, even if IceRpc.Protobuf.Tools references the Google.Protobuf.Tools package, the properties defined there – used to locate the protoc compiler and Protobuf well-known files – wouldn't be defined when the ProtoCompile task runs in the user project that only references IceRpc.Protobuf.Tools.
I assume we could add fallback properties in IceRpc.Protobuf.Tools for this situation.
I assume we could add fallback properties in IceRpc.Protobuf.Tools for this situation.
I need to test if that is enough, it is not clear to me if the dependencies of packages defining DevelopmentDependency
are pulled. Here IceRpc.Protobuf.Tools
package is a development dependency.
If we add Google.Protobuf.Tools
dependency to IceRpc.Protobuf.Tools
it doesn't help. When a project adds IceRpc.Protobuf.Tools
it will not pull Google.Protobuf.Tools
, this is how dev dependencies work.
I think it will be simpler to repackage Google.Protobuf.Tools
inside IceRpc.Protobuf.Tools
assuming the licenses are compatible.
Ok.
It would be nicer if IceRpc.Protobuf.Tools could "pull" a specific version of Google.Protobuf.Tools.
This way, in your IceRPC + Protobuf project file, you would need to reference only (a specific version of) IceRpc.Protobuf.Tools. However, that's not the case. The GreeterProtobuf examples shows you need to reference both Google.Protobuf.Tools and IceRpc.Protobuf.Tools.
Why this setup?