Skip to content

Tower compilation issue when upgrading to 0.4 #552

@duarten

Description

@duarten

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions