-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into protoc_wrapper_argfile
- Loading branch information
Showing
5 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
load("@rules_proto//proto:defs.bzl", "proto_library") | ||
load("//proto/prost:defs.bzl", "rust_prost_library") | ||
load("//rust:defs.bzl", "rust_test") | ||
|
||
package(default_visibility = ["//proto/prost/private/tests:__subpackages__"]) | ||
|
||
proto_library( | ||
name = "camel_case_proto", | ||
srcs = [ | ||
"camel_case.proto", | ||
], | ||
strip_import_prefix = "/proto/prost/private/tests/camel_case", | ||
) | ||
|
||
proto_library( | ||
name = "another_proto", | ||
srcs = [ | ||
"another.proto", | ||
], | ||
deps = [ | ||
":camel_case_proto", | ||
], | ||
) | ||
|
||
rust_prost_library( | ||
name = "another_proto_rust", | ||
proto = ":another_proto", | ||
) | ||
|
||
rust_test( | ||
name = "camel_case_test", | ||
srcs = ["camel_case_test.rs"], | ||
edition = "2021", | ||
deps = [ | ||
":another_proto_rust", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
syntax = "proto3"; | ||
|
||
package another; | ||
|
||
import "camel_case.proto"; | ||
|
||
message Another { | ||
camel_case.NameWithCAPS inner = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
syntax = "proto3"; | ||
|
||
package camel_case; | ||
|
||
message NameWithCAPS { | ||
string name = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//! Tests that strange casings of message names are handled correctly. | ||
|
||
use another_proto::another::Another; | ||
|
||
#[test] | ||
fn test_nested_messages() { | ||
let _a = Another::default(); | ||
} |