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

core: Allow for using only futures-util dependency #609

Merged
merged 4 commits into from Mar 8, 2021

Conversation

Xanewok
Copy link
Contributor

@Xanewok Xanewok commented Jan 20, 2021

Fixes #604

This makes cargo build --no-default-features work by pulling only futures-util (and transitively futures-task). It's worth noting that:

  1. the convenience handle_request_sync function is only available when using futures-executor feature,
  2. ...and so cargo test only works with default feature set (no idea how to cleanly enable the crate features for unit tests).

Copy link
Contributor

@tomusdrw tomusdrw left a comment

Choose a reason for hiding this comment

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

Initially futures was re-exported to make it less annoying to import futures library just for Future trait. Now with async/await and std::future::Future we should get rid of this long-term.

@Xanewok
Copy link
Contributor Author

Xanewok commented Jan 20, 2021

gitlab-test-windows-stable failure seems to be spurious:

$ cargo build --all
error: failed to run `rustc` to learn about target-specific information
Caused by:
  process didn't exit successfully: `sccache rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 2)

but I can't seem to be able to re-run it 😢

@tomusdrw
Copy link
Contributor

@Xanewok restarted.

Copy link
Member

@niklasad1 niklasad1 left a comment

Choose a reason for hiding this comment

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

LGTM,

...and so cargo test only works with default feature set (no idea how to cleanly enable the crate features for unit tests).

rust-lang/cargo#2911 😬

@niklasad1 niklasad1 merged commit 9c8110d into master Mar 8, 2021
@niklasad1 niklasad1 deleted the igor-core-futures-subset branch March 8, 2021 19:06
@tomusdrw tomusdrw mentioned this pull request Mar 31, 2021
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.

core should depend on a subset of futures
3 participants