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

transports/dns/: Don't feature flag std::io import #3027

Merged
merged 1 commit into from
Oct 14, 2022

Conversation

mxinden
Copy link
Member

@mxinden mxinden commented Oct 14, 2022

Description

Functions like parse_dnsaddr_txt depend on the std::io import. Given that the function is not feature flagged, compilation without features fails.

Links to any relevant issues

Discovered while releasing v0.49.0. Would like to get this in before continuing the v0.49.0 release. #2931

Open Questions

Even though libp2p-dns is useless without either the async-io or tokio feature flag, I do still think that it should compile without. Objections?

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Functions like `parse_dnsaddr_txt` depend on the `std::io` import. Given
that the function is not feature flagged, compilation without features
fails.
@mxinden
Copy link
Member Author

mxinden commented Oct 14, 2022

I think we can ignore the failing semver checks, given that we are in between releases right now. See #2931.

@mxinden
Copy link
Member Author

mxinden commented Oct 14, 2022

Given that this is a very minor change, I will go ahead and merge, thus unblocking in half-published v0.49.0 release.

Please still review this patch. I will take care of any requested follow-ups.

@mxinden mxinden merged commit b5612dc into libp2p:master Oct 14, 2022
@thomaseizinger
Copy link
Contributor

Why did CI not catch this?

thomaseizinger pushed a commit to kpp/rust-libp2p that referenced this pull request Oct 17, 2022
Functions like `parse_dnsaddr_txt` depend on the `std::io` import. Given
that the function is not feature flagged, compilation without features
fails.
mxinden added a commit to mxinden/rust-libp2p that referenced this pull request Oct 19, 2022
@mxinden
Copy link
Member Author

mxinden commented Oct 19, 2022

Why did CI not catch this?

#3044 reverting this is not failing.

My suspicion would be that the tokio or async-std feature is enabled through some other crate and thus e.g. the "Build and test (--no-default-features) (pull_request)" CI step succeeds. One such crate would e.g. be libp2p-mdns:

[[test]]
name = "use-async-std"
required-features = ["async-io"]
[[test]]
name = "use-tokio"
required-features = ["tokio"]

@thomaseizinger does that suspicion make sense?

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