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 11
11
- name : Checkout
12
12
uses : actions/checkout@v3
13
13
- name : Install Protoc
14
- run : |
15
- ./install_protoc.sh
14
+ run : ./install_protoc.sh
15
+ shell : bash
16
16
- name : Check
17
17
run : |
18
18
make deps
31
31
- name : Checkout
32
32
uses : actions/checkout@v3
33
33
- name : Install Protoc
34
- run : |
35
- ./install_protoc.sh
34
+ run : ./install_protoc.sh
35
+ shell : bash
36
36
- name : Build
37
37
run : |
38
38
make
Original file line number Diff line number Diff line change @@ -10,4 +10,5 @@ example/protocols/**/*.rs
10
10
example2 /protocols /** /* .rs
11
11
! example2 /protocols /** /mod.rs
12
12
src /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
24
24
.PHONY : test
25
25
test :
26
26
ifeq ($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
29
28
else
30
29
# cargo test --all-features --verbose
31
30
cargo test --features sync,async,rustprotobuf
@@ -36,11 +35,15 @@ endif
36
35
check :
37
36
cargo fmt --all -- --check
38
37
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
39
42
cargo clippy --all-targets --no-default-features --features sync,async,prost -- -D warnings
43
+ endif
40
44
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."
13
13
[dev-dependencies ]
14
14
protobuf = " 3.1.0"
15
15
bytes = " 0.4.11"
16
- libc = " 0.2.79 "
16
+ libc = " 0.2.158 "
17
17
byteorder = " 1.3.2"
18
18
log = " 0.4.6"
19
19
simple-logging = " 2.0.2"
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ use ttrpc::r#async::Client;
12
12
13
13
#[ tokio:: main( flavor = "current_thread" ) ]
14
14
async fn main ( ) {
15
- let c = Client :: connect ( utils:: SOCK_ADDR ) . unwrap ( ) ;
15
+ let c = Client :: connect ( utils:: SOCK_ADDR ) . await . unwrap ( ) ;
16
16
let hc = health:: HealthClient :: new ( c. clone ( ) ) ;
17
17
let ac = agent:: AgentServiceClient :: new ( c) ;
18
18
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ use ttrpc::r#async::Client;
14
14
async fn main ( ) {
15
15
simple_logging:: log_to_stderr ( log:: LevelFilter :: Info ) ;
16
16
17
- let c = Client :: connect ( utils:: SOCK_ADDR ) . unwrap ( ) ;
17
+ let c = Client :: connect ( utils:: SOCK_ADDR ) . await . unwrap ( ) ;
18
18
let sc = streaming:: StreamingClient :: new ( c) ;
19
19
20
20
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 {
434
434
. map_err( :: ttrpc:: err_to_others!( e, "Encoding error " ) ) ?;
435
435
436
436
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 ( ) ) ;
438
438
439
439
return Ok ( stream) ;
440
440
} ;
You can’t perform that action at this time.
0 commit comments