Adding upstream version 1.2+20240521.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
6b2864e4b9
commit
8512f66c5a
229 changed files with 19561 additions and 0 deletions
|
@ -0,0 +1,30 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package import_circular_dependency;
|
||||
|
||||
import "root.proto";
|
||||
import "other.proto";
|
||||
|
||||
// This test-case verifies support for circular dependencies in the generated python files.
|
||||
//
|
||||
// This is important because we generate 1 python file/module per package, rather than 1 file per proto file.
|
||||
//
|
||||
// Scenario:
|
||||
//
|
||||
// The proto messages depend on each other in a non-circular way:
|
||||
//
|
||||
// Test -------> RootPackageMessage <--------------.
|
||||
// `------------------------------------> OtherPackageMessage
|
||||
//
|
||||
// Test and RootPackageMessage are in different files, but belong to the same package (root):
|
||||
//
|
||||
// (Test -------> RootPackageMessage) <------------.
|
||||
// `------------------------------------> OtherPackageMessage
|
||||
//
|
||||
// After grouping the packages into single files or modules, a circular dependency is created:
|
||||
//
|
||||
// (root: Test & RootPackageMessage) <-------> (other: OtherPackageMessage)
|
||||
message Test {
|
||||
RootPackageMessage message = 1;
|
||||
other.OtherPackageMessage other = 2;
|
||||
}
|
8
tests/inputs/import_circular_dependency/other.proto
Normal file
8
tests/inputs/import_circular_dependency/other.proto
Normal file
|
@ -0,0 +1,8 @@
|
|||
syntax = "proto3";
|
||||
|
||||
import "root.proto";
|
||||
package import_circular_dependency.other;
|
||||
|
||||
message OtherPackageMessage {
|
||||
RootPackageMessage rootPackageMessage = 1;
|
||||
}
|
7
tests/inputs/import_circular_dependency/root.proto
Normal file
7
tests/inputs/import_circular_dependency/root.proto
Normal file
|
@ -0,0 +1,7 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package import_circular_dependency;
|
||||
|
||||
message RootPackageMessage {
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue