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

fix(rust): Make Zebra build with the latest nightly Rust #5738

Merged
merged 5 commits into from
Nov 30, 2022

Conversation

teor2345
Copy link
Contributor

Motivation

Zebra doesn't build on the latest nightly Rust due to a compiler bug:
rust-lang/rust#105044

Solution

It seems like it's going to be tricky to diagnose the bug, so I rewrote the code to avoid it.

I also dealt with some new clippy lints and compiler warnings.

Review

Anyone can review this fix. It's not urgent.

Reviewer Checklist

  • Will the PR name make sense to users?
    • Does it need extra CHANGELOG info? (new features, breaking changes, large changes)
  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
  • How do you know it works? Does it have tests?

@teor2345 teor2345 added A-rust Area: Updates to Rust code P-Medium ⚡ I-build-fail Zebra fails to build labels Nov 29, 2022
@teor2345 teor2345 requested a review from a team as a code owner November 29, 2022 08:39
@teor2345 teor2345 self-assigned this Nov 29, 2022
@teor2345 teor2345 requested a review from a team as a code owner November 29, 2022 08:39
@teor2345 teor2345 requested review from oxarbitrage and removed request for a team November 29, 2022 08:39
@github-actions github-actions bot added the C-bug Category: This is a bug label Nov 29, 2022
@teor2345 teor2345 added C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG and removed C-bug Category: This is a bug labels Nov 29, 2022
@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Merging #5738 (78c8d5d) into main (1262c88) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5738      +/-   ##
==========================================
+ Coverage   78.75%   78.79%   +0.03%     
==========================================
  Files         306      306              
  Lines       38552    38563      +11     
==========================================
+ Hits        30362    30384      +22     
+ Misses       8190     8179      -11     

@teor2345
Copy link
Contributor Author

teor2345 commented Nov 29, 2022

Failed due to #5384 and a clippy warning about the workaround.

@github-actions github-actions bot added the C-bug Category: This is a bug label Nov 29, 2022
@teor2345 teor2345 removed the request for review from a team November 29, 2022 23:22
@teor2345
Copy link
Contributor Author

Failed due to #5384

mergify bot added a commit that referenced this pull request Nov 30, 2022
@mergify mergify bot merged commit 26ff1b4 into main Nov 30, 2022
@mergify mergify bot deleted the nightly-build-errors branch November 30, 2022 07:03
@teor2345
Copy link
Contributor Author

The underlying rustc bug was fixed in nightly-2022-12-09 in rust-lang/rust#105009

teor2345 added a commit that referenced this pull request Feb 6, 2023
* Remove an unused async track_caller which will soon become a warning

* Explicitly drop unused futures

* Work around a compiler panic (ICE) with flat_map()

rust-lang/rust#105044

* Remove a redundant into_iter()

* allow(clippy::needless_collect)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rust Area: Updates to Rust code C-bug Category: This is a bug C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG I-build-fail Zebra fails to build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants