-
Notifications
You must be signed in to change notification settings - Fork 51
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
Upgrade to tonic 0.8.x #506
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
with: | ||
version: '3.x' | ||
- uses: actions/checkout@v3 | ||
- name: cargo fmt | ||
working-directory: ${{github.workspace}} | ||
|
@@ -45,6 +49,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
with: | ||
version: '3.x' | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/[email protected] | ||
with: | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,24 @@ members = [ | |
"kuksa_databroker/databroker-examples", | ||
] | ||
|
||
[workspace.dependencies] | ||
clap = { version = "3.1.10", default-features = false, features = [ | ||
"std", | ||
"env", | ||
] } | ||
databroker-proto = { path = "kuksa_databroker/databroker-proto" } | ||
prost = "0.11" | ||
prost-types = "0.11" | ||
tokio = { version = "1.17.0", features = [ | ||
"macros", | ||
"rt-multi-thread", | ||
"time", | ||
"signal", | ||
] } | ||
tokio-stream = { version = "0.1.8", features = ["sync", "net"] } | ||
tonic = "0.8" | ||
tonic-build = "0.8" | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good initiative with workspace dependencies! However, I think it would be better to use it only for specifying a shared version, i.e. ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, and one more thing. Since features are additive, in order for the workspace.dependencies not to inadvertently enable all the default features (see default-features ignored), So at least for clap in this case (and maybe for all?)
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't that also be the decision (responsibility) of the different packages? In the end they will need to know if they need/want the default features or not, or won't they? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes exactly. So in order to give them the ability to make that decision, the workspace dependencies need to have Otherwise, default-features will be enabled for every member regardless of what they specify themself. |
||
[profile.release] | ||
lto = true # Link time optimization (dead code removal etc...) | ||
opt-level = "s" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just
apt install
it?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would, of course, also work but then you have no control over the version being installed (which may or may not be relevant). If you'd rather have the OS package being used, I will be happy to change it ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point as well.
Preferably though, we want it to work with any protoc version (which by the way probably means we should rethink the current use of
optional
in thekuksa.val.v1
.proto files).I would say if it just works replacing it with
apt install
at this point in time, I'd go with that.