File tree Expand file tree Collapse file tree 9 files changed +37
-17
lines changed Expand file tree Collapse file tree 9 files changed +37
-17
lines changed Original file line number Diff line number Diff line change 1111 - name : Checkout
1212 uses : actions/checkout@v3
1313 - name : Install Protoc
14- run : |
15- ./install_protoc.sh
14+ run : ./install_protoc.sh
15+ shell : bash
1616 - name : Check
1717 run : |
1818 make deps
3131 - name : Checkout
3232 uses : actions/checkout@v3
3333 - name : Install Protoc
34- run : |
35- ./install_protoc.sh
34+ run : ./install_protoc.sh
35+ shell : bash
3636 - name : Build
3737 run : |
3838 make
Original file line number Diff line number Diff line change @@ -10,4 +10,5 @@ example/protocols/**/*.rs
1010example2 /protocols /** /* .rs
1111! example2 /protocols /** /mod.rs
1212src /ttrpc.rs
13- example2 /protocols /** /* .rs
13+ example2 /protocols /** /* .rs
14+ ! example2 /protocols /** /mod.rs
Original file line number Diff line number Diff line change @@ -24,8 +24,7 @@ build: debug
2424.PHONY : test
2525test :
2626ifeq ($OS,Windows_NT)
27- # async isn't enabled for windows, don't test that feature
28- cargo test --verbose
27+ cargo test --features sync,async,rustprotobuf
2928else
3029 # cargo test --all-features --verbose
3130 cargo test --features sync,async,rustprotobuf
@@ -36,11 +35,15 @@ endif
3635check :
3736 cargo fmt --all -- --check
3837 cargo clippy --all-targets --features sync,async -- -D warnings
38+ # Skip prost check on Windows
39+ ifeq ($(OS ) ,Windows_NT)
40+ @echo "Skipping prost check on Windows"
41+ else
3942 cargo clippy --all-targets --no-default-features --features sync,async,prost -- -D warnings
43+ endif
4044
41- .PHONY : deps
42- deps :
43- rustup update stable
44- rustup default stable
45- rustup component add rustfmt clippy
46- ./install_protoc.sh
45+ .PHONY : check-all
46+ check-all :
47+ $(MAKE ) check
48+ $(MAKE ) -C compiler check
49+ $(MAKE ) -C ttrpc-codegen check
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ description = "An example of ttrpc."
1313[dev-dependencies ]
1414protobuf = " 3.1.0"
1515bytes = " 0.4.11"
16- libc = " 0.2.79 "
16+ libc = " 0.2.158 "
1717byteorder = " 1.3.2"
1818log = " 0.4.6"
1919simple-logging = " 2.0.2"
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ use ttrpc::r#async::Client;
1212
1313#[ tokio:: main( flavor = "current_thread" ) ]
1414async fn main ( ) {
15- let c = Client :: connect ( utils:: SOCK_ADDR ) . unwrap ( ) ;
15+ let c = Client :: connect ( utils:: SOCK_ADDR ) . await . unwrap ( ) ;
1616 let hc = health:: HealthClient :: new ( c. clone ( ) ) ;
1717 let ac = agent:: AgentServiceClient :: new ( c) ;
1818
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ use ttrpc::r#async::Client;
1414async fn main ( ) {
1515 simple_logging:: log_to_stderr ( log:: LevelFilter :: Info ) ;
1616
17- let c = Client :: connect ( utils:: SOCK_ADDR ) . unwrap ( ) ;
17+ let c = Client :: connect ( utils:: SOCK_ADDR ) . await . unwrap ( ) ;
1818 let sc = streaming:: StreamingClient :: new ( c) ;
1919
2020 let _now = std:: time:: Instant :: now ( ) ;
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2020 Ant Financial
2+ //
3+ // SPDX-License-Identifier: Apache-2.0
4+ //
5+
6+ #![ allow( dead_code) ]
7+
8+ include ! ( "_include.rs" ) ;
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2020 Ant Financial
2+ //
3+ // SPDX-License-Identifier: Apache-2.0
4+ //
5+
6+ #![ allow( dead_code) ]
7+
8+ include ! ( "_include.rs" ) ;
Original file line number Diff line number Diff line change @@ -434,7 +434,7 @@ macro_rules! async_client_stream_receive {
434434 . map_err( :: ttrpc:: err_to_others!( e, "Encoding error " ) ) ?;
435435
436436 let inner = $self. client. new_stream( creq, false , true ) . await ?;
437- let stream = :: ttrpc:: r#async:: ClientStreamReceiver :: new( inner) ;
437+ let stream = :: ttrpc:: r#async:: ClientStreamReceiver :: new( inner, $self . client . clone ( ) ) ;
438438
439439 return Ok ( stream) ;
440440 } ;
You can’t perform that action at this time.
0 commit comments