Skip to content

Commit 0b137f1

Browse files
committed
fix: fix redundant comments and wrong links
1 parent a1f1436 commit 0b137f1

File tree

10 files changed

+174
-102
lines changed

10 files changed

+174
-102
lines changed

content/en/blog/releases/Kitex/release-v0_13_0.md

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ description: >
1111
## **Introduction to Key Changes**
1212

1313
### **New Features**
14-
1. New streaming interface StreamX supports gRPC, existing Kitex gRPC users can migrate
14+
1. **New streaming interface StreamX supports gRPC, existing Kitex gRPC users can migrate**
15+
1516
v0.12.0 released the StreamX interface to optimise the streaming experience, and supported the custom streaming protocol TTHeader Streaming, but did not support gRPC. So existing users could not migrate.
1617

1718
This version supports gRPC for StreamX, users can migrate to StreamX, and the Server side can be compatible with two streaming protocols at the same time. So there is no need to worry about protocol compatibility after interface migration.
@@ -20,7 +21,8 @@ description: >
2021

2122
User documentation: [StreamX User Documentation](/docs/kitex/tutorials/basic-feature/streamx)
2223

23-
2. Prutal - Protobuf's non-generated code serialisation library
24+
2. **Prutal - Protobuf's non-generated code serialisation library**
25+
2426
[Prutal](https://github.com/cloudwego/prutal) is officially open source, on par with Thrift's [Frugal](https://github.com/cloudwego/frugal), and the new version of Kitex integrates Prutal by default.
2527

2628
Advantages:
@@ -34,59 +36,79 @@ description: >
3436
User documentation: [Prutal](/docs/kitex/tutorials/code-gen/prutal)
3537

3638
### **Feature/Experience Optimization**
37-
1. **TTHeader Streaming**: Support interface-level Recv timeout control
39+
1. **TTHeader Streaming: Support interface-level Recv timeout control**
40+
3841
In addition to the existing Client level, this release of TTHeader Streaming supports interface-level Recv timeout configuration, making configuration more flexible.
3942

40-
User documentation: [StreamX Timeout Control](/docs/kitex/tutorials/basic-feature/streamx/timeout-control)
43+
User documentation: [StreamX Timeout Control](/docs/kitex/tutorials/basic-feature/streamx/kitex+streamx+-+stream+timeout+control/)
44+
45+
2. **Default Thrift transport protocol changed from Buffered to Framed**
4146

42-
2. Default Thrift transport protocol changed from Buffered to Framed
4347
This change can leverage FastCodec for better performance.
4448

4549
### **Others**
46-
1. Code Product Simplification
47-
- Kitex Tool would not generate the repeated verification code for Set data structure and the ```DeepEqual``` function for each structure by default.
50+
1. **Code Product Simplification**
51+
52+
- Kitex Tool would not generate the repeated verification code for Set data structure and the ```DeepEqual``` function for each structure by default.
4853

49-
- If you only want to restore```DeepEqual```, add```-thrift gen_deep_equal=true```to the generation command.
54+
- If you only want to restore```DeepEqual```, add```-thrift gen_deep_equal=true```to the generation command.
5055

51-
- If you want to restore the repeated verification of Set, add```-thrift validate_set=true, -thrift gen_deep_equal=true```to the generation command.
56+
- If you want to restore the repeated verification of Set, add```-thrift validate_set=true, -thrift gen_deep_equal=true```to the generation command.
5257

53-
- Kitex Tool would not generate the Apache Codec related code by default.
58+
- Kitex Tool would not generate the Apache Codec related code by default.
5459

55-
- If you want to restore it, add```-thrift no_default_serdes=false```to the generation command.
60+
- If you want to restore it, add```-thrift no_default_serdes=false```to the generation command.
5661

57-
2. Go Supported Version Change
62+
2. **Go Supported Version Change**
63+
5864
Support version Go 1.19~1.24, the lowest supported version becomes Go 1.19.
5965

6066
if Go version is too low, there will be a prompt when compiling:```note: module requires Go 1.19```.
6167

6268
## **Full Change**
6369
### Feature
6470
[[#1719](https://github.com/cloudwego/kitex/pull/1719)] feat: prutal for replacing protoc
71+
6572
[[#1736](https://github.com/cloudwego/kitex/pull/1736)] feat(ttstream): support WithRecvTimeout stream call option
73+
6674
[[#1702](https://github.com/cloudwego/kitex/pull/1702)] feat(gRPC): add grpc client conn dump to help debug the conn and stream status
75+
6776
[[#1723](https://github.com/cloudwego/kitex/pull/1723)] feat(codec/thrift): use fastcodec/frugal if apache codec not available
77+
6878
[[#1724](https://github.com/cloudwego/kitex/pull/1724)] feat: add tail option to support for delayed initialization of some client options
6979

7080
### Optimize
7181
[[#1728](https://github.com/cloudwego/kitex/pull/1728)] optimize(apache): remove apache codec gen and set default protocol from buffered to framed
82+
7283
[[#1732](https://github.com/cloudwego/kitex/pull/1732)] optimize(rpcinfo): purify the transport protocol of rpcinfo in a single rpc request
84+
7385
[[#1711](https://github.com/cloudwego/kitex/pull/1711)] optimize(tool): disable set validate and deep equal code gen to simplify kitex_gen
86+
7487
[[#1717](https://github.com/cloudwego/kitex/pull/1717)] optimize(gRPC): return more detailed error when received invalid http2 frame
7588

7689
### Fix
7790
[[#1734](https://github.com/cloudwego/kitex/pull/1734)] fix(ttstream): adjust stream state transition and remove all SetFinalizer to avoid memory leak
91+
7892
[[#1735](https://github.com/cloudwego/kitex/pull/1735)] fix(generic): support both relative and absolute check for idl includes parse to make it compatible with generation tool
93+
7994
[[#1725](https://github.com/cloudwego/kitex/pull/1725)] fix: code gen import issue for streamx mode, stream call judgement bug and set ttheader streaming as default
80-
[[#1727](https://github.com/cloudwego/kitex/pull/1727)] fix(tool): fix tool UseStdLib remains unexcepted lib issue.
95+
96+
[[#1727](https://github.com/cloudwego/kitex/pull/1727)] fix(tool): fix tool UseStdLib remains unexcepted lib issue
8197

8298
### Refactor
8399
[[#1658](https://github.com/cloudwego/kitex/pull/1658)] refactor: streamx api to adapt both grpc and ttheader streaming protocol and provide more user-friendly interface
100+
84101
[[#1729](https://github.com/cloudwego/kitex/pull/1729)] refactor(tool): move pb tpl code to sep pkg
85102

86103
### Chore
87104
[[#1743](https://github.com/cloudwego/kitex/pull/1743)] chore: update dependencies version
105+
88106
[[#1740](https://github.com/cloudwego/kitex/pull/1740)] chore(generic): deprecate NewThriftContentProvider
107+
89108
[[#1741](https://github.com/cloudwego/kitex/pull/1741)] chore(streamx): remove redundant streamx package
109+
90110
[[#1738](https://github.com/cloudwego/kitex/pull/1738)] ci: fix typos & crate-ci/typos
111+
91112
[[#1737](https://github.com/cloudwego/kitex/pull/1737)] chore: update dependency and change go support to 1.19-1.24
113+
92114
[[#1720](https://github.com/cloudwego/kitex/pull/1720)] Revert "fix(ttstream): pingpong method refers to server interface defined in Kitex generation code when streamx is enabled and there are other streaming methods"

content/en/docs/kitex/Tutorials/basic-feature/streamx/Kitex+StreamX+-+Stream+Basic+Programming.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ To maintain compatibility with legacy stream-generated code, Command Line needs
5555
kitex -streamx -module <go module> -service service echo.thrift
5656
```
5757

58-
##### Initialization
58+
### Initialization
5959

6060
#### Create Client
6161

content/en/docs/kitex/Tutorials/basic-feature/streamx/Kitex+StreamX+-+Stream+Metainfo.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: ""
88

99
## Preface
1010

11-
The overall usage of message pass-through is similar to [Kitex - 元信息透传](https://bytedance.larkoffice.com/wiki/Y3ChwldJzihF4Vkb6Ekcie38no4), except that each stream can only **pass-through meta-information when created** , and sending messages cannot pass-through.
11+
The overall usage of message pass-through is similar to [Metainfo](/docs/kitex/tutorials/advanced-feature/metainfo/), except that each stream can only **pass-through meta-information when created** , and sending messages cannot pass-through.
1212

1313
## User guide
1414

@@ -37,7 +37,9 @@ func (s *streamingService) EchoClient(ctx context.Context,
3737

3838
### Server reverse pass-through meta-message
3939

40-
Reverse pass-through introduces a new concept, Header and Trailer. Any complete data stream must include Header and Trailer. Use these two frames to reverse pass-through information.
40+
Reverse pass-through introduces a new concept, Header and Trailer. Any complete data stream must include Header and Trailer.
41+
42+
Use these two frames to reverse pass-through information.
4143

4244
```go
4345
import "github.com/cloudwego/pkg/streaming"
@@ -75,6 +77,6 @@ tl, err := stream.Trailer()
7577

7678
Because the concept of flow is different from , under the flow, the Header can be sent independently, which means that my server can send the Header in the first second, send the Data after 10 seconds, and send the Trailer after 1 second.
7779

78-
At the same time, the client can also choose whether to call `.Header () ` or `.Trailer () ` to block.
80+
At the same time, the client can also choose whether to call `.Header()` or `.Trailer ()` to block.
7981

80-
Therefore, the semantics of traditional CTX cannot meet the reverse pass-through function of streams. Forward pass-through is still consistent with the original .
82+
Therefore, the semantics of traditional ctx cannot meet the reverse pass-through function of streams. Forward pass-through is still consistent with the original.

content/en/docs/kitex/Tutorials/basic-feature/streamx/Kitex+StreamX+-+Stream+Middleware.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ type StreamRecvMiddleware func(next StreamRecvEndpoint) StreamRecvEndpoint
6060

6161
### Unary Middlware
6262

63-
For all non-streaming interfaces, we additionally provide ```UnaryMiddleware``` for injecting middleware that only works on all unary methods, which is identical to the ```WithMiddleware``` natively supported by kitex, with the difference that the latter can also work on streaming methods.
63+
For all non-streaming interfaces, we additionally provide ```UnaryMiddleware``` for injecting middleware that only works on all unary methods.
64+
65+
It is identical to the ```WithMiddleware``` natively supported by kitex, with the difference that the latter can also work on streaming methods.
6466
```go
6567
type UnaryEndpoint Endpoint
6668
type UnaryMiddleware func(next UnaryEndpoint) UnaryEndpoint

content/en/docs/kitex/Tutorials/basic-feature/streamx/Kitex+StreamX+-+Stream+Timeout+Control.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "StreamX timeout control"
2+
title: "StreamX Timeout Control"
33
date: 2025-01-10
44
weight: 5
55
keywords: ["Stream Timeout Control Best Practices"]

content/en/docs/kitex/Tutorials/code-gen/prutal.md

Lines changed: 44 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,68 +7,80 @@ description: "Protobuf's non-generated code serialisation library"
77
---
88

99
## **Abstraction**
10-
Starting from v0.13.0, kitex will use its own prutal implementation to replace Protobuf's protoc and protoc-gen-go for code generation and serialisation.
1110

12-
kitex will no longer need to install protoc, protoc-gen-go. New users will not be aware of the change.
11+
Starting from v0.13.0, Kitex will use its own Prutal implementation to replace Protobuf's protoc and protoc-gen-go for code generation and serialisation.
1312

14-
prutal is compatible with the existing protobuf in terms of serialisation, and generates code that is very compact, has no extra code, and has better serialisation performance than the official one.
13+
Kitex will no longer need to install protoc, protoc-gen-go. New users will not be aware of the change.
1514

16-
Technically prutal and frugal similar to the use of struct tags and efficient reflection to achieve serialisation , and does not rely on redundant generation code.
15+
Prutal is compatible with the existing Protobuf in terms of serialisation, and generates code that is very compact, has no extra code, and has better serialisation performance than the official one.
1716

18-
Currently open source, the specific implementation and subsequent benchmark data can be concerned: https://github.com/cloudwego/prutal
17+
Technically Prutal and Frugal are similar to the use of struct tags and efficient reflection to achieve serialisation, and does not rely on redundant generation code.
18+
19+
Currently open source, the specific implementation and subsequent benchmark data can be viewed: https://github.com/cloudwego/prutal
1920

2021
## **Using Advices**
21-
Initially, it is not recommended that users use prutal directly, and currently only promises forward and backward compatibility with prutal integration in kitex.
22+
23+
Initially, it is not recommended that users use Prutal directly, and currently only promises forward and backward compatibility with Prutal integration in Kitex.
24+
25+
If you find any problems while using Kitex, you can fallback to Protobuf using the environment variable KITEX_TOOL_USE_PROTOC
2226

23-
If you find any problems while using kitex, you can fallback to protobuf using the environment variable KITEX_TOOL_USE_PROTOC
27+
```
28+
KITEX_TOOL_USE_PROTOC=1 kitex --version
29+
```
2430

25-
```KITEX_TOOL_USE_PROTOC=1 kitex --version```
31+
In the future, Kitex will deprecate the protoc implementation.
2632

27-
In the long run, kitex will deprecate the protoc implementation. It is recommended that if you encounter problems with usage, you can provide feedback to help improve it.
33+
It is recommended that if you encounter problems with usage, you can provide feedback to help improve it.
2834

2935
## **Kitex Tool Updates**
30-
Since protoc is no longer used as the default code generation tool, the following arguments will be deprecated:
36+
37+
Since protoc is no longer used as the default code generation tool, the following arguments will be deprecated:
3138

3239
--protobuf
3340

3441
--protobuf-plugin
3542

36-
These two arguments are mainly used for passthrough to protoc, and are not actually used by kitex itself. If they are still specified, an error will be reported:
43+
These two arguments are mainly used for passthrough to protoc, and are not actually used by Kitex itself. If they are still specified, an error will be reported:
3744

38-
```
39-
[ERROR] invalid value ‘xxx’ for flag -protobuf: flag is deprecated
40-
[ERROR] invalid value ‘xxx’ for flag -protobuf-plugin: flag is deprecated
41-
```
45+
```
46+
[ERROR] invalid value ‘xxx’ for flag -protobuf: flag is deprecated
47+
[ERROR] invalid value ‘xxx’ for flag -protobuf-plugin: flag is deprecated
48+
```
4249

43-
Users can call protoc and related plugins for code generation if they want. Instead of relying on kitex to call protoc.
50+
Users can call protoc and related plugins for code generation if they want. Instead of relying on Kitex to call protoc.
4451

45-
Due to the complexity of generating paths in older protoc implementations, the following arguments do not work in older implementations:
52+
Due to the complexity of generating paths in older protoc implementations, the following arguments do not work in older implementations:
4653

4754
-gen-path
4855

49-
which defaults to kitex_gen, has been fixed in the new Prutal.
56+
which defaults to kitex_gen, has been fixed in the new Prutal.
5057

5158
## **Prutal and Protobuf compatibility issues**
52-
kitex uses prutal to generate code by default.
5359

54-
If the user does Marshal / Unmarshal directly from the protobuf library, the new kitex will generate code with a compile-time error:
60+
Kitex uses Prutal to generate code by default.
5561

56-
```cannot use &YourRequest{} (value of type *YourRequest) as protoreflect.ProtoMessage value in argument to proto.Marshal: *YourRequest does not implement protoreflect.ProtoMessage (missing method ProtoReflect) ```
57-
This is because the protobuf library is strongly bound to the protobuf generation code, and protobuf needs to generate a lot of binary data to assist its reflection implementation.
62+
If the user does Marshal / Unmarshal directly from the protobuf library, the new Kitex will generate code with a compile-time error:
5863

59-
It is recommended to use the github.com/cloudwego/prutal package directly.
64+
```
65+
cannot use &YourRequest{} (value of type *YourRequest) as protoreflect.ProtoMessage value in argument to proto.Marshal: *YourRequest does not implement protoreflect.ProtoMessage (missing method ProtoReflect)
66+
```
6067

61-
```
62-
// MarshalAppend appends the protobuf encoding of v to b and returns the new bytes
63-
func MarshalAppend(b []byte, v interface{}) ([]byte, error)
68+
This is because the Protobuf library is strongly bound to the Protobuf generation code, and Protobuf needs to generate a lot of binary data to assist its reflection implementation.
6469

65-
// Unmarshal parses the protobuf-encoded data and stores the result in the value pointed to by v.
66-
func Unmarshal(b []byte, v interface{}) error
67-
```
70+
It is recommended to use the github.com/cloudwego/prutal package directly.
6871

69-
prutal is compatible with protobuf generated code. So even if the original code was generated by the official protobuf, you can use prutal to serialise it for better performance.
72+
```
73+
// MarshalAppend appends the protobuf encoding of v to b and returns the new bytes
74+
func MarshalAppend(b []byte, v interface{}) ([]byte, error)
7075
71-
Since protobuf is complex and has a lot of features, prutal can't guarantee 100% compatibility, so if you find any problems, please feel free to comment.
76+
// Unmarshal parses the protobuf-encoded data and stores the result in the value pointed to by v.
77+
func Unmarshal(b []byte, v interface{}) error
78+
```
79+
80+
Prutal is compatible with Protobuf generated code. So even if the original code was generated by the official Protobuf, you can use Prutal to serialise it for better performance.
81+
82+
Since Protobuf is complex and has a lot of features, Prutal can't guarantee 100% compatibility, so if you find any problems, please feel free to pull an issue.
7283

7384
## **Feedback to us**
74-
If you have any questions, you can submit an [issue](https://github.com/cloudwego/prutal/issues) to prutal for feedback.
85+
86+
If you have any questions, you can submit an [issue](https://github.com/cloudwego/prutal/issues) to Prutal for feedback.

0 commit comments

Comments
 (0)