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

Tower compilation issue when upgrading to 0.4 #552

Closed
duarten opened this issue Feb 2, 2021 · 1 comment
Closed

Tower compilation issue when upgrading to 0.4 #552

duarten opened this issue Feb 2, 2021 · 1 comment

Comments

@duarten
Copy link

duarten commented Feb 2, 2021

Bug Report

Version

v0.4.0

Platform

macOS/Linux

Crates

tonic

Description

Give this set of dependencies:

tokio = { version = "1.0", features = ["net", "sync", "time"] }
tonic = { version = "0.4", default-features = false, features = ["transport"] }
tower = "0.4"

The build fails without even reaching my code with:

   Compiling tower v0.4.0
error[E0432]: unresolved imports `tower_layer::layer_fn`, `tower_layer::LayerFn`
 --> /Users/duarte.nunes/.cargo/registry/src/github.com-1ecc6299db9ec823/tower-0.4.0/src/util/boxed/sync.rs:1:19
  |
1 | use tower_layer::{layer_fn, LayerFn};
  |                   ^^^^^^^^  ^^^^^^^
  |                   |         |
  |                   |         no `LayerFn` in the root
  |                   |         help: a similar name exists in the module: `Layer`
  |                   no `layer_fn` in the root

Seems like the layer feature should be enabled for tower 0.4?

@duarten duarten changed the title Tower compilation issue when upgrading to 4.0 Tower compilation issue when upgrading to 0.4 Feb 2, 2021
@duarten
Copy link
Author

duarten commented Feb 2, 2021

Seems like this is fixed by forcing tower to 0.4.4 :)

@duarten duarten closed this as completed Feb 2, 2021
davidpdrsn added a commit to davidpdrsn/tonic that referenced this issue Feb 3, 2021
In tower 0.4.0 we missed a couple of re-exports that tonic 0.4.0 depends
on. So tonic really depends on tower at least version 0.4.1. Since
specifying your tower depedency as 0.4 means you might get 0.4.0, you
might get build errors when updating tonic. Such as [hyperium#553] and [hyperium#552].

This fixes that by bumping tonic's dependency on tower to 0.4.4. That
means users will get at least tower version 0.4.4, but semver compatible
updates are still allowed.

[hyperium#553]: hyperium#553
[hyperium#552]: hyperium#552
davidpdrsn added a commit to davidpdrsn/tonic that referenced this issue Feb 3, 2021
In tower 0.4.0 we missed a couple of re-exports that tonic 0.4.0 depends
on. So tonic really depends on tower at least version 0.4.1. Since
specifying your tower depedency as 0.4 means you might get 0.4.0, you
might get build errors when updating tonic. Such as [hyperium#553] and [hyperium#552].

This fixes that by bumping tonic's dependency on tower to 0.4.4. That
means users will get at least tower version 0.4.4, but semver compatible
updates are still allowed.

Fixes hyperium#553

[hyperium#553]: hyperium#553
[hyperium#552]: hyperium#552
LucioFranco pushed a commit that referenced this issue Feb 12, 2021
In tower 0.4.0 we missed a couple of re-exports that tonic 0.4.0 depends
on. So tonic really depends on tower at least version 0.4.1. Since
specifying your tower depedency as 0.4 means you might get 0.4.0, you
might get build errors when updating tonic. Such as [#553] and [#552].

This fixes that by bumping tonic's dependency on tower to 0.4.4. That
means users will get at least tower version 0.4.4, but semver compatible
updates are still allowed.

Fixes #553

[#553]: #553
[#552]: #552
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant