Snap for 8191477 from bc9227eceb93d3a8e0b73ae5c45fb7723001a9d1 to tm-frc-ipsec-release Change-Id: Iac88238304a3b18e86e5a87bc0e6106b884b4766
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 0be67b3..051cfa6 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@ { "git": { - "sha1": "3eabf141db9d0d69961ba8a1eaf2907c7aeb8ff9" + "sha1": "d65abd3c6cee1dacef1448146b488ee168492a7d" } }
diff --git a/Android.bp b/Android.bp index e180529..0661355 100644 --- a/Android.bp +++ b/Android.bp
@@ -1,4 +1,4 @@ -// This file is generated by cargo2android.py --run --dependencies --tests. +// This file is generated by cargo2android.py --config cargo2android.json. // Do not modify this file as changes will be overridden on upgrade. package { @@ -23,6 +23,8 @@ rust_library_host { name: "libprotobuf_codegen", crate_name: "protobuf_codegen", + cargo_env_compat: true, + cargo_pkg_version: "2.25.1", srcs: ["src/lib.rs"], edition: "2015", rustlibs: [ @@ -31,8 +33,10 @@ } rust_test_host { - name: "protobuf-codegen_host_test_src_lib", + name: "protobuf-codegen_test_src_lib", crate_name: "protobuf_codegen", + cargo_env_compat: true, + cargo_pkg_version: "2.25.1", srcs: ["src/lib.rs"], test_suites: ["general-tests"], auto_gen_config: true, @@ -48,6 +52,8 @@ rust_binary_host { name: "protoc-gen-rust", crate_name: "protoc_gen_rust", + cargo_env_compat: true, + cargo_pkg_version: "2.25.1", srcs: ["src/bin/protoc-gen-rust.rs"], edition: "2015", rustlibs: [ @@ -55,6 +61,3 @@ "libprotobuf_codegen", ], } - -// dependent_library ["feature_list"] -// protobuf-2.22.1
diff --git a/Cargo.lock b/Cargo.lock index 8d6fde0..23a2ce0 100644 --- a/Cargo.lock +++ b/Cargo.lock
@@ -4,13 +4,13 @@ [[package]] name = "protobuf" -version = "2.22.1" +version = "2.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b7f4a129bb3754c25a4e04032a90173c68f85168f77118ac4cb4936e7f06f92" +checksum = "23129d50f2c9355ced935fce8a08bd706ee2e7ce2b3b33bf61dace0e379ac63a" [[package]] name = "protobuf-codegen" -version = "2.22.1" +version = "2.25.1" dependencies = [ "protobuf", ]
diff --git a/Cargo.toml b/Cargo.toml index b594d67..9221304 100644 --- a/Cargo.toml +++ b/Cargo.toml
@@ -3,16 +3,15 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g., crates.io) dependencies +# to registry (e.g., crates.io) dependencies. # -# If you believe there's an error in this file please file an -# issue against the rust-lang/cargo repository. If you're -# editing this file be aware that the upstream Cargo.toml -# will likely look very different (and much more reasonable) +# If you are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. [package] name = "protobuf-codegen" -version = "2.22.1" +version = "2.25.1" authors = ["Stepan Koltsov <[email protected]>"] description = "Code generator for rust-protobuf.\n\nIncludes a library and `protoc-gen-rust` binary.\n\nSee `protoc-rust` and `protobuf-codegen-pure` crates.\n" homepage = "https://github.com/stepancheg/rust-protobuf/" @@ -34,4 +33,4 @@ path = "src/bin/protobuf-bin-gen-rust-do-not-use.rs" test = false [dependencies.protobuf] -version = "=2.22.1" +version = "=2.25.1"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 07931fd..c223967 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@ [package] name = "protobuf-codegen" -version = "2.22.1" +version = "2.25.1" authors = ["Stepan Koltsov <[email protected]>"] license = "MIT" homepage = "https://github.com/stepancheg/rust-protobuf/" @@ -17,7 +17,7 @@ bench = false [dependencies] -protobuf = { path = "../protobuf", version = "=2.22.1" } +protobuf = { path = "../protobuf", version = "=2.25.1" } [[bin]]
diff --git a/METADATA b/METADATA index e905992..5ebf251 100644 --- a/METADATA +++ b/METADATA
@@ -7,13 +7,13 @@ } url { type: ARCHIVE - value: "https://static.crates.io/crates/protobuf-codegen/protobuf-codegen-2.22.1.crate" + value: "https://static.crates.io/crates/protobuf-codegen/protobuf-codegen-2.25.1.crate" } - version: "2.22.1" + version: "2.25.1" license_type: NOTICE last_upgrade_date { year: 2021 - month: 4 - day: 1 + month: 9 + day: 22 } }
diff --git a/README.android b/README.android deleted file mode 100644 index a75eb35..0000000 --- a/README.android +++ /dev/null
@@ -1,15 +0,0 @@ -Since we do not run build.rs during an Android build, -we need to set up the version number in src/lib.rs -until we have a smarter way to patch it based on new -version number in Cargo.toml. - -To update this package, please make sure that the following code -in src/lib.rs is up to data. - - // Hack: hard code version number here because Android.bp - // rust modules cannot pass it though env variable yet. - w.write_generated_by("rust-protobuf", "2.16.2"); - -If there are non-trivial changes in build.rs or src/lib.rs, -please rerun cargo2android.py and verify the differences in -Android.bp and src/lib.rs.
diff --git a/cargo2android.json b/cargo2android.json new file mode 100644 index 0000000..341300b --- /dev/null +++ b/cargo2android.json
@@ -0,0 +1,4 @@ +{ + "run": true, + "tests": true +} \ No newline at end of file
diff --git a/src/lib.rs b/src/lib.rs index 3458957..0a0316c 100644 --- a/src/lib.rs +++ b/src/lib.rs
@@ -192,7 +192,7 @@ { let mut w = CodeWriter::new(&mut v); - w.write_generated_by("rust-protobuf", "2.22.1"); + w.write_generated_by("rust-protobuf", "2.25.1"); w.write_line(&format!("//! Generated file from `{}`", file.get_name())); if customize.inside_protobuf != Some(true) { w.write_line("");
diff --git a/src/protobuf_name.rs b/src/protobuf_name.rs index 03163e3..c40a69c 100644 --- a/src/protobuf_name.rs +++ b/src/protobuf_name.rs
@@ -245,8 +245,8 @@ /// From string. pub fn new(path: String) -> ProtobufAbsolutePath { - assert!(path.is_empty() || path.starts_with("."), path); - assert!(!path.ends_with("."), path); + assert!(path.is_empty() || path.starts_with("."), "{}", path); + assert!(!path.ends_with("."), "{}", path); ProtobufAbsolutePath { path } }