Skip to content

Commit

Permalink
fix(volo-build): not add vologen prefix for rust type
Browse files Browse the repository at this point in the history
  • Loading branch information
Ggiggle committed Nov 5, 2024
1 parent 70e89bd commit d7b77de
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
20 changes: 8 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ license = "MIT OR Apache-2.0"
rust-version = "1.80.0"

[workspace.dependencies]
pilota = "0.11"
pilota-build = "0.11"
pilota-thrift-parser = "0.11"
# pilota = { git = "https://github.com/cloudwego/pilota", branch = "main" }
# pilota-build = { git = "https://github.com/cloudwego/pilota", branch = "main" }
# pilota-thrift-parser = { git = "https://github.com/cloudwego/pilota", branch = "main" }
# pilota = "0.11"
# pilota-build = "0.11"
# pilota-thrift-parser = "0.11"
pilota = { git = "https://github.com/cloudwego/pilota", branch = "fix/method_name_start_with_underscore" }
pilota-build = { git = "https://github.com/cloudwego/pilota", branch = "fix/method_name_start_with_underscore" }
pilota-thrift-parser = { git = "https://github.com/cloudwego/pilota", branch = "fix/method_name_start_with_underscore" }

motore = "0.4"
# motore = { git = "https://github.com/cloudwego/motore", branch = "main" }
Expand Down
2 changes: 1 addition & 1 deletion volo-build/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "volo-build"
version = "0.10.15"
version = "0.10.16"
edition.workspace = true
homepage.workspace = true
repository.workspace = true
Expand Down
6 changes: 5 additions & 1 deletion volo-build/src/thrift_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,11 @@ impl pilota_build::CodegenBackend for VoloThriftBackend {
.map(|a| {
let ty = self.inner.codegen_item_ty(a.ty.kind.clone()).global_path();
let ident = self.cx().rust_name(a.def_id).0.field_ident(); // use the _{rust-style fieldname} without keyword escaping
format!("_{ident}: volo_gen{ty}")
if need_prepend_volo_gen_path(&a.ty.kind) {
format!("_{ident}: volo_gen{ty}")
} else {
format!("_{ident}: {ty}")
}
})
.join(",");

Expand Down

0 comments on commit d7b77de

Please sign in to comment.