Skip to content

remove all remaining uses of futures v0.1.x (in favor of v0.3.x)#11352

Merged
tdyas merged 1 commit into
pantsbuild:masterfrom
tdyas:remove_futures01_finally
Dec 20, 2020
Merged

remove all remaining uses of futures v0.1.x (in favor of v0.3.x)#11352
tdyas merged 1 commit into
pantsbuild:masterfrom
tdyas:remove_futures01_finally

Conversation

@tdyas
Copy link
Copy Markdown
Contributor

@tdyas tdyas commented Dec 20, 2020

Problem

v0.1.x of the futures crate is obsolete and all uses should be removed. The Pants code base has been using the compat feature of futures v0.3.x to interoperate between code using v0.3.x and the code still using v0.1.x.

Solution

Remove all remaining uses of futures v0.1.x in favor of the current v0.3.x.

Changes:

  • Move the try_future! macro to the tryfuture crate. Added unit test and better macro hygiene.
  • Replace all uses of the Pants boxfuture crate with futures::future::BoxFuture from futures v0.3.x and then remove boxfuture.

Result

Existing tests continue to pass. Added test for try_future! macro.

@tdyas
Copy link
Copy Markdown
Contributor Author

tdyas commented Dec 20, 2020

Note: After this PR lands, I will put back the uses of try_future! that my previous PRs removed, now that this PR introduces a version of try_future! that works with futures 0.3.

Copy link
Copy Markdown
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Thanks!

@tdyas tdyas merged commit 8eea68b into pantsbuild:master Dec 20, 2020
@tdyas tdyas deleted the remove_futures01_finally branch December 20, 2020 07:17
tdyas pushed a commit that referenced this pull request Dec 20, 2020
Restore some recently-removed `try_future!` usages now that #11352 has landed and there is a version of the `try_future` macro that works with `futures` v0.3.x.
@stuhood stuhood mentioned this pull request Dec 29, 2020
stuhood added a commit that referenced this pull request Dec 29, 2020
### Internal Changes

* Fix too many line breaks for options in docs site ([#11377](#11377))

* Use more newlines in options help messages ([#11372](#11372))

* Fix some newlines not rendering correctly on docsite ([#11371](#11371))

* Fix formatting for `./pants subsystems` and `./pants targets` ([#11368](#11368))

* Simplify `generate_docs.py` to no longer require manually generating the input data ([#11363](#11363))

* Use the whole description for `./pants help $subsystem` ([#11361](#11361))

* Use newlines in `./pants help $target_type` ([#11355](#11355))

* [internal] Install rustup on the lint shards. ([#11392](#11392))

* Install Rust through global, pre-installed Rustup ([#11256](#11256))

* Revert "Add goals to run_info (#11374)" ([#11379](#11379))

* Add goals to run_info ([#11374](#11374))

* Update all rust dependencies within their declared ranges. ([#11366](#11366))

* Update to nails 0.11.0. ([#11370](#11370))

* cleanup some futures-related references ([#11360](#11360))

* [internal] Switch to toolchain pants plugin ([#11357](#11357))

* Simplify and fix the @ensure_daemon decorator. ([#11356](#11356))

* restore some try_future uses that were recently removed ([#11353](#11353))

* remove all remaining uses of futures v0.1.x (in favor of v0.3.x) ([#11352](#11352))

* Prepare the 1.30.2 release notes. ([#11351](#11351))

* remove remaining futures v0.1.x uses from fs/store and downstream callers ([#11346](#11346))

* fix Prost revision that did not get updated in prior PR ([#11345](#11345))

* add extension method for prost::Message for encoding to Bytes ([#11344](#11344))

* Stop installing Cmake, Go, and Protoc when bootstrapping Rust ([#11336](#11336))

* Automatically set the version in generate_docs.py ([#11337](#11337))

* Prepare 2.1.1. ([#11334](#11334))

* Prepare 2.0.1. ([#11333](#11333))

* Prepare the 1.30.2rc3 release notes. ([#11327](#11327))

* Prepare 2.0.1rc4 (again). ([#11323](#11323))

* Add type annotations around Subsystem class ([#11389](#11389))

* Support deprecation_start_version in help info. ([#11350](#11350))

[ci skip-rust]
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

Successfully merging this pull request may close these issues.

2 participants