Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stability: remove unwrap call in volo #310

Merged
merged 5 commits into from
Jan 22, 2024
Merged

stability: remove unwrap call in volo #310

merged 5 commits into from
Jan 22, 2024

Conversation

Ggiggle
Copy link
Contributor

@Ggiggle Ggiggle commented Jan 3, 2024

Motivation

unwrap might lead to panic, but without logic error message

Solution

remove the unwrap call when:

  1. the framework can handle the error or none branch, otherwise the unwrap will be reserved.
  2. provide some useful error message in terminal tool

@Ggiggle Ggiggle requested review from a team as code owners January 3, 2024 10:50
@Ggiggle Ggiggle self-assigned this Jan 3, 2024
volo-cli/src/init.rs Outdated Show resolved Hide resolved
volo-build/src/util.rs Outdated Show resolved Hide resolved
volo-build/src/workspace.rs Show resolved Hide resolved
volo-cli/src/idl/update.rs Outdated Show resolved Hide resolved
volo-thrift/src/context.rs Outdated Show resolved Hide resolved
volo-thrift/src/transport/pingpong/server.rs Outdated Show resolved Hide resolved
volo-http/src/server.rs Outdated Show resolved Hide resolved
volo-build/src/model.rs Outdated Show resolved Hide resolved
volo-build/src/util.rs Outdated Show resolved Hide resolved
volo-http/src/server.rs Outdated Show resolved Hide resolved
volo-thrift/src/context.rs Outdated Show resolved Hide resolved
volo-thrift/src/transport/multiplex/server.rs Show resolved Hide resolved
volo-thrift/src/transport/multiplex/server.rs Show resolved Hide resolved
volo-thrift/src/transport/pingpong/server.rs Show resolved Hide resolved
Copy link
Member

@PureWhiteWu PureWhiteWu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great work!

volo-thrift/Cargo.toml Outdated Show resolved Hide resolved
volo-cli/src/idl/add.rs Outdated Show resolved Hide resolved
volo-http/src/server.rs Outdated Show resolved Hide resolved
@yukiiiteru
Copy link
Member

But it is a break change to update HttpContext::addr from Address to Option<Address>, maybe it needs a rollback.

PureWhiteWu
PureWhiteWu previously approved these changes Jan 11, 2024
volo-build/src/util.rs Outdated Show resolved Hide resolved
volo-build/src/workspace.rs Outdated Show resolved Hide resolved
volo-http/src/context.rs Outdated Show resolved Hide resolved
volo-thrift/src/codec/default/mod.rs Outdated Show resolved Hide resolved
PureWhiteWu
PureWhiteWu previously approved these changes Jan 22, 2024
@Ggiggle Ggiggle enabled auto-merge (squash) January 22, 2024 07:20
Millione
Millione previously approved these changes Jan 22, 2024
@Ggiggle Ggiggle dismissed stale reviews from Millione and PureWhiteWu via 5107aef January 22, 2024 09:44
@Ggiggle Ggiggle merged commit 7293b80 into main Jan 22, 2024
18 checks passed
@Ggiggle Ggiggle deleted the fix/clear_unwrap branch January 22, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants