Migrate to pin project lite#595
Conversation
Turns IntoStream into a regular struct because pin_project_lite does not and will support tuple structs. https://github.com/taiki-e/pin-project-lite/blob/416be96f7777862c68b567c92a91887f69a8c2b3/src/lib.rs#L401-L408
This enables migration to pin_project_lite, which does not and will not support tuple structs https://github.com/taiki-e/pin-project-lite/blob/416be96f7777862c68b567c92a91887f69a8c2b3/src/lib.rs#L401-L408
Note: the doc comment on AsyncResponseFuture::service was also reduced to a regular comment. This is a known limitation of pin_project_lite that the they have labeled as "help wanted". taiki-e/pin-project-lite#3 (comment)
pin_project_lite has the current limitation of nto supporting doc comments taiki-e/pin-project-lite#3 (comment) pin_project_lite does not and will not support tuple variants https://github.com/taiki-e/pin-project-lite/blob/416be96f7777862c68b567c92a91887f69a8c2b3/src/lib.rs#L401-L408
peak_wma and pending_requests will now properly compile without the "discover" feature enabled.
|
Running the tests on both stable and nightly pass locally for me. On nightly, I do receive multiple warnings about a lint renaming. I'd appreciate any advice on how to diagnose further. On Stable $ rustc --version
rustc 1.53.0 (53cb7b09b 2021-06-17)
$ cargo test --all --all-features
(passes)On Nightly $ rustc +nightly --version
rustc 1.56.0-nightly (08095fc1f 2021-07-26)
$ cargo +nightly test --all --all-features
(passes)The lint rename warning |
8 | #![deny(broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `rustdoc::broken_intra_doc_links`
|
= note: `#[warn(renamed_and_removed_lints)]` on by default |
|
@Michael-J-Ward are you able to rename it? or is it not available on stable yet? |
broken_intra_doc_links has been renamed to rustdoc::broken_intra_doc_links
|
I should have been clearer- the lint warning was not the reason for the failure. This test below is failing in CI but I can't trigger the failure locally. Running tests/spawn_ready/main.rs (target/debug/deps/spawn_ready-102042b79d40a5b4)
running 4 tests
test propagates_trace_spans ... ok
test abort_on_drop ... FAILED
test when_inner_is_not_ready ... ok
test when_inner_fails ... ok
failures:
---- abort_on_drop stdout ----
thread 'abort_on_drop' panicked at 'pending', tower/tests/spawn_ready/main.rs:84:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
abort_on_drop
test result: FAILED. 3 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
error: test failed, to rerun pass '-p tower --test spawn_ready'
Error: The process '/usr/share/rust/.cargo/bin/cargo' failed with exit code 101 |
|
@taiki-e are there any differences in drop behavior between pin project and pin project lite? |
pin_project_lite does support PinnedDrop https://github.com/taiki-e/pin-project-lite/pull/25/files However, it does not support generic trait bounds on the PinnedDrop impl. To workaround this, I removed the T::Error bound from the Worker struct definition, and moved `close_semaphore` to a a new impl without that trait bound.
I don't think so. |
|
After updating cargo and disabling / clearing out sccache, I am able to reproduce the However, |
This test was also failing on master.
0108b5a to
5c1c39f
Compare
- Migrate to pin-project-lite ([#595]) - **builder**: Implement `Layer` for `ServiceBuilder` ([#600]) - **builder**: Add `ServiceBuilder::and_then` analogous to `ServiceExt::and_then` ([#601]) [#600]: #600 [#601]: #601 [#595]: #595 [pin-project-lite]: https://crates.io/crates/pin-project-lite
- Migrate to pin-project-lite ([#595]) - **builder**: Implement `Layer` for `ServiceBuilder` ([#600]) - **builder**: Add `ServiceBuilder::and_then` analogous to `ServiceExt::and_then` ([#601]) [#600]: #600 [#601]: #601 [#595]: #595 [pin-project-lite]: https://crates.io/crates/pin-project-lite
Clears out the easy parts of #594.
Remaining:
util::Either- it is public and the migration requires a breaking change (as described here)buffer::worker- would love to take a shot at the refactor with a little more guidance.