Skip to content

Commit

Permalink
fix: enable the code index for volo gen code (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ggiggle authored Dec 5, 2023
1 parent 7a28689 commit 5b2ffdc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/volo-gen/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod gen {
volo::include_service!("thrift_gen.rs");
volo::include_service!("proto_gen.rs");
include!(concat!(env!("OUT_DIR"), "/thrift_gen.rs"));
include!(concat!(env!("OUT_DIR"), "/proto_gen.rs"));
}

pub use gen::*;
2 changes: 1 addition & 1 deletion volo-cli/src/templates/grpc/volo-gen/src/lib_rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


mod gen {{
volo::include_service!("volo_gen.rs");
include!(concat!(env!("OUT_DIR"), "/volo_gen.rs"));
}}

pub use gen::volo_gen::*;
2 changes: 1 addition & 1 deletion volo-cli/src/templates/thrift/volo-gen/src/lib_rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mod gen {{
volo::include_service!("volo_gen.rs");
include!(concat!(env!("OUT_DIR"), "/volo_gen.rs"));
}}

pub use gen::volo_gen::*;
1 change: 1 addition & 0 deletions volo/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ macro_rules! volo_unreachable {
}

#[macro_export]
#[deprecated(since = "0.8.1", note = "use `include!` instead")]
macro_rules! include_service {
($service: tt) => {
include!(concat!(env!("OUT_DIR"), concat!("/", $service)));
Expand Down

0 comments on commit 5b2ffdc

Please sign in to comment.