Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
sunli829 committed Jul 19, 2024
2 parents f47fd47 + 0b213ae commit 75a34ca
Show file tree
Hide file tree
Showing 22 changed files with 160 additions and 8,994 deletions.
11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ repository = "https://github.com/poem-web/poem"
rust-version = "1.75"

[workspace.dependencies]
poem = { path = "poem", version = "3.0.1", default-features = false }
poem-derive = { path = "poem-derive", version = "3.0.0" }
poem-openapi-derive = { path = "poem-openapi-derive", version = "5.0.2" }
poem = { path = "poem", version = "3.0.2", default-features = false }
poem-derive = { path = "poem-derive", version = "3.0.2" }
poem-openapi-derive = { path = "poem-openapi-derive", version = "5.0.3" }
poem-grpc-build = { path = "poem-grpc-build", version = "0.4.0" }

proc-macro-crate = "3.0.0"
Expand All @@ -41,12 +41,13 @@ bytes = "1.1.0"
futures-util = "0.3.17"
tokio-stream = "0.1.8"
serde_yaml = "0.9"
quick-xml = { version = "0.31.0", features = ["serialize"] }
quick-xml = { version = "0.32.0", features = ["serialize"] }
base64 = "0.22.0"
serde_urlencoded = "0.7.1"
indexmap = "2.0.0"
reqwest = { version = "0.12.2", default-features = false }
darling = "0.20.8"
darling = "0.20.10"
http = "1.0.0"

# rustls, update together
rustls = "0.22.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ mime = "0.3.16"
open = "5.0.1"
futures-util = "0.3.21"
tokio-stream = "0.1.8"
prost = "0.12.0"
prost = "0.13.1"
6 changes: 3 additions & 3 deletions examples/disabled/tonic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ publish.workspace = true
[dependencies]
poem = { workspace = true, features = ["tower-compat"] }
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
prost = "0.12.0"
tonic = "0.10.2"
prost = "0.13.1"
tonic = "0.12.1"
tracing-subscriber.workspace = true
tower = { version = "0.4.8", features = ["buffer"] }

[build-dependencies]
tonic-build = "0.10.2"
tonic-build = "0.12.1"

[[bin]]
name = "example-tonic-client"
Expand Down
2 changes: 1 addition & 1 deletion examples/grpc/routeguide/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl RouteGuide for RouteGuideService {
while let Some(note) = stream.next().await {
let note = note?;

let location = note.location.clone().unwrap();
let location = note.location.unwrap();

let location_notes = notes.entry(location).or_insert(vec![]);
location_notes.push(note);
Expand Down
2 changes: 1 addition & 1 deletion examples/poem/async-graphql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ publish.workspace = true
[dependencies]
poem.workspace = true
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
async-graphql = "5.0.10"
async-graphql = "7.0.7"
slab = "0.4.4"
tracing-subscriber.workspace = true
9 changes: 5 additions & 4 deletions examples/poem/async-graphql/src/starwars/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,12 @@ impl QueryRoot {
}

#[derive(Interface)]
#[allow(clippy::duplicated_attributes)]
#[graphql(
field(name = "id", type = "&str"),
field(name = "name", type = "&str"),
field(name = "friends", type = "Vec<Character<'ctx>>"),
field(name = "appears_in", type = "&[Episode]")
field(name = "id", ty = "&str"),
field(name = "name", ty = "&str"),
field(name = "friends", ty = "Vec<Character<'ctx>>"),
field(name = "appears_in", ty = "&[Episode]")
)]
pub enum Character<'a> {
Human(Human<'a>),
Expand Down
8 changes: 4 additions & 4 deletions examples/poem/opentelemetry-jaeger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ publish.workspace = true
poem = { workspace = true, features = ["opentelemetry"] }
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
tracing-subscriber.workspace = true
opentelemetry = { version = "0.22.0", features = ["metrics"] }
opentelemetry_sdk = { version = "0.22.0", features = ["rt-tokio"] }
opentelemetry-http = { version = "0.11.0" }
opentelemetry-otlp = { version = "0.15.0", features = [
opentelemetry = { version = "0.23.0", features = ["metrics"] }
opentelemetry_sdk = { version = "0.23.0", features = ["rt-tokio"] }
opentelemetry-http = { version = "0.12.0" }
opentelemetry-otlp = { version = "0.16.0", features = [
"trace",
] }
reqwest = "0.11"
Expand Down
2 changes: 1 addition & 1 deletion poem-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "poem-derive"
version = "3.0.0"
version = "3.0.2"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion poem-grpc-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ categories = ["network-programming", "asynchronous"]

[dependencies]
prettyplease = "0.2.9"
prost-build = "0.12.0"
prost-build = "0.13.1"
quote.workspace = true
proc-macro2.workspace = true
syn.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion poem-grpc-build/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub(crate) fn generate(config: &GrpcConfig, service: &Service, buf: &mut String)
let name = format_ident!("{}", method.name);
let input_type = syn::parse_str::<Type>(&method.input_type).unwrap();
let output_type = syn::parse_str::<Type>(&method.output_type).unwrap();
let path = if !config.emit_package {
let path = if !config.emit_package && !service.package.is_empty() {
format!(
"/{}.{}/{}",
service.package, service.proto_name, method.proto_name
Expand Down
2 changes: 1 addition & 1 deletion poem-grpc-build/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub(crate) fn generate(config: &GrpcConfig, service: &Service, buf: &mut String)
})
.collect::<Vec<_>>();
let crate_name = get_crate_name(config.internal);
let service_name = if !config.emit_package {
let service_name = if !config.emit_package && !service.package.is_empty() {
format!("{}.{}", service.package, service.proto_name)
} else {
service.proto_name.clone()
Expand Down
5 changes: 5 additions & 0 deletions poem-grpc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

# [0.4.2] 2024-07-19

- Fix #840: Grpc build emit package when package is empty [#841](https://github.com/poem-web/poem/pull/841)
- chore: bump prost to 0.13 [#849](https://github.com/poem-web/poem/pull/849)

# [0.4.1] 2024-05-18

- message can span multiple frame [#817](https://github.com/poem-web/poem/pull/817)
Expand Down
8 changes: 4 additions & 4 deletions poem-grpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "poem-grpc"
version = "0.4.1"
version = "0.4.2"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand All @@ -27,16 +27,16 @@ flate2 = "1.0.24"
itoa = "1.0.2"
percent-encoding = "2.1.0"
bytes.workspace = true
prost = "0.12.0"
prost = "0.13.1"
base64.workspace = true
prost-types = "0.12.0"
prost-types = "0.13.1"
tokio-stream = { workspace = true, features = ["sync"] }
serde = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }
rustls = { workspace = true }
thiserror.workspace = true
fastrand = "2.0.0"
http = "1.0.0"
http.workspace = true
hyper = { version = "1.0.0", features = ["http1", "http2"] }
hyper-util = { version = "0.1.3", features = ["client-legacy", "tokio"] }
http-body-util = "0.1.0"
Expand Down
4 changes: 2 additions & 2 deletions poem-openapi-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "poem-openapi-derive"
version = "5.0.2"
version = "5.0.3"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand All @@ -24,7 +24,7 @@ syn = { workspace = true, features = ["full", "visit-mut"] }
thiserror.workspace = true
indexmap.workspace = true
regex.workspace = true
http = "1.0.0"
http.workspace = true
mime.workspace = true

[package.metadata.workspaces]
Expand Down
2 changes: 1 addition & 1 deletion poem-openapi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "poem-openapi"
version = "5.0.2"
version = "5.0.3"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
1 change: 0 additions & 1 deletion poem-openapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ To avoid compiling unused dependencies, Poem gates certain features, some of whi
| redoc | Add Redoc UI support |
| email | Support for email address string |
| hostname | Support for hostname string |
| humantime | Integrate with the [`humantime` crate](https://crates.io/crates/humantime) |
| uuid | Integrate with the [`uuid` crate](https://crates.io/crates/uuid) |
| url | Integrate with the [`url` crate](https://crates.io/crates/url) |
| geo | Integrate with the [`geo-types` crate](https://crates.io/crates/geo-types) |
Expand Down
3 changes: 1 addition & 2 deletions poem-openapi/src/ui/swagger_ui/swagger-ui-bundle.js

Large diffs are not rendered by default.

Loading

0 comments on commit 75a34ca

Please sign in to comment.