Skip to content

Bump workspace to rust edition 2018 #1780

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

Merged
merged 1 commit into from
Oct 22, 2022

Conversation

wpaulino
Copy link
Contributor

Mostly motivated by the need of async/await.

To reproduce, follow https://doc.rust-lang.org/cargo/commands/cargo-fix.html#edition-migration.

@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2022

Codecov Report

Base: 90.71% // Head: 90.71% // No change to project coverage 👍

Coverage data is based on head (dbbbd46) compared to base (ad82c9e).
Patch coverage: 90.54% of modified lines in pull request are covered.

❗ Current head dbbbd46 differs from pull request most recent head f4f1093. Consider uploading reports for the commit f4f1093 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1780   +/-   ##
=======================================
  Coverage   90.71%   90.71%           
=======================================
  Files          87       87           
  Lines       47353    47353           
  Branches    47353    47353           
=======================================
  Hits        42958    42958           
  Misses       4395     4395           
Impacted Files Coverage Δ
lightning-invoice/src/payment.rs 89.85% <ø> (ø)
lightning-invoice/src/ser.rs 92.19% <ø> (ø)
lightning/src/chain/chainmonitor.rs 97.78% <ø> (ø)
lightning/src/chain/channelmonitor.rs 90.70% <ø> (ø)
lightning/src/chain/keysinterface.rs 91.61% <ø> (ø)
lightning/src/chain/mod.rs 68.18% <ø> (ø)
lightning/src/chain/onchaintx.rs 94.17% <ø> (-0.23%) ⬇️
lightning/src/chain/package.rs 92.84% <ø> (ø)
lightning/src/chain/transaction.rs 100.00% <ø> (ø)
lightning/src/debug_sync.rs 95.58% <ø> (ø)
... and 57 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@wpaulino wpaulino force-pushed the rust-edition-2018 branch 6 times, most recently from 051b258 to 707ff84 Compare October 19, 2022 03:40
@dunxen
Copy link
Contributor

dunxen commented Oct 19, 2022

Nice. Could you maybe list the combination of commands and args you used? Seems I keep missing some areas. Struggling to reproduce.

@wpaulino
Copy link
Contributor Author

Could you maybe list the combination of commands and args you used? Seems I keep missing some areas. Struggling to reproduce.

It was quite troublesome, I had to apply the migration multiple times due to numerous imports gated behind different features and config flags. I then committed the changes after each iteration and squashed them all into a single commit.

@dunxen
Copy link
Contributor

dunxen commented Oct 19, 2022

It was quite troublesome, I had to apply the migration multiple times due to numerous imports gated behind different features and config flags. I then committed the changes after each iteration and squashed them all into a single commit.

Yeah I think that's pretty much the trouble I'm dealing with. Not getting all the combos of config and features. I'll attempt again in the morning. Think I just had fuzzing left then maybe I can share a repro.

@wpaulino
Copy link
Contributor Author

In any case, with the edition = 2018 option now in the manifest, the compiler will abort with any remaining errors so we can be sure we've migrated the entirety of the project. As for the changes themselves, while the diff is large, they all involve adding a crate:: prefix to import paths for modules within the same workspace.

@tnull
Copy link
Contributor

tnull commented Oct 20, 2022

Seems this needs a rebase now?

@tnull tnull self-requested a review October 20, 2022 06:24
@wpaulino wpaulino force-pushed the rust-edition-2018 branch 2 times, most recently from 2df7003 to ee7abae Compare October 20, 2022 19:42
@dunxen
Copy link
Contributor

dunxen commented Oct 20, 2022

Alright, I've reproduced this but pretty much also lost track of all the steps. Phew!

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

Can you take the first commit from #1770 so that this doesn't conflict there?

Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

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

Looks good, now my finger hurts from scrolling.

@wpaulino wpaulino force-pushed the rust-edition-2018 branch 2 times, most recently from db5348f to dbbbd46 Compare October 21, 2022 19:54
@wpaulino
Copy link
Contributor Author

Rebased to address conflicts.

@dunxen
Copy link
Contributor

dunxen commented Oct 21, 2022

Oof. All those conflicts 😢

Basically looks good to me unless we still wanted something split out of here into a follow up, or are we happy with the whole package?

dunxen
dunxen previously approved these changes Oct 21, 2022
Copy link
Contributor

@dunxen dunxen left a comment

Choose a reason for hiding this comment

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

Not sure if we wanted to split any of these changes out as discussed on discord, but this LGTM. Bring on the merge conflicts?

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

Only one note.

Mostly motivated by the need of async/await.
Copy link
Contributor

@jkczyz jkczyz left a comment

Choose a reason for hiding this comment

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

Everything looks crate!

@jkczyz
Copy link
Contributor

jkczyz commented Oct 21, 2022

Everything looks crate!

Except the CI error... looks transient.

@TheBlueMatt
Copy link
Collaborator

Yea, will give CI a nudge once the others pass, is a networking issue for github CI failing to talk to....github 🤦

@TheBlueMatt TheBlueMatt merged commit fc9a4c2 into lightningdevkit:main Oct 22, 2022
@wpaulino wpaulino deleted the rust-edition-2018 branch October 31, 2022 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants