8000 fix(next): linting issues from Rust 1.80 by augustoccesar · Pull Request #582 · arlyon/async-stripe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(next): linting issues from Rust 1.80 #582

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 5 commits into from
Jul 31, 2024

Conversation

augustoccesar
Copy link
Contributor
@augustoccesar augustoccesar commented Jul 29, 2024

Summary

This applies fixes for issues that are introduced by the new version of Rust: 1.80.
These are the following:

  • Lazy doc continuation:

    In CommonMark Markdown, the language used to write doc comments, a paragraph nested within a list or block quote does not need any line after the first one to be indented or marked. The specification calls this a “lazy paragraph continuation.”

    To avoid confusion, this means that multilines now need to be explicit. The two cases where that is the case today is for the docs on the async-stripe/src/lib.rs where we use >, and when generating doc comments.
    The doc comments specifically, we break the line if is too long. But we don't verify that we are breaking a list item. These should be indented differently. Check bebd57e and 20f3ceb.

    For example, on generated/async-stripe-shared/src/invoice.rs it there is this example that should be different on 1.80:

    /// Indicates the reason why the invoice was created.
    ///
    /// * `manual`: Unrelated to a subscription, for example, created via the invoice editor.
    /// * `subscription`: No longer in use.
    - /// Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.
    + ///   Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.
    /// * `subscription_create`: A new subscription was created.
  • Checked cfg names: Now Rust verify that the used cfg are defined in the Cargo.toml. Which is not the case for multiple ones on async-stripe-webhook. Check c94b754

⚠️ Note: This still needs #581 so that it can be compiled. Merged! ✅
⚠️ Note 2: I did not run the openapi generation (seems like there are quite a few changes since the latest version available) that will fix the formatting of the docs comments. Not sure if the run of it should be part of this PR or if is fine to run afterwards. Nvm 😅 Just noticed that could run for the current version. So only invoice.rs has changed. Check 74cfc03.

Checklist

@augustoccesar augustoccesar force-pushed the fix/linting-issues-from-1.80 branch from c94b754 to 8038d01 Compare July 29, 2024 14:09
@augustoccesar augustoccesar force-pushed the fix/linting-issues-from-1.80 branch from 8038d01 to 6897762 Compare July 29, 2024 14:10
@augustoccesar augustoccesar changed the title fix: linting issues from 1.80 fix: linting issues from Rust 1.80 Jul 29, 2024
Rust 1.80 enables check cfg by default. This means that it will look
for unexpected cfg configs.
Currently we are using multiple cfgs that are not defined on
the webhook Cargo.toml. This should fix it.
@augustoccesar augustoccesar force-pushed the fix/linting-issues-from-1.80 branch from 74cfc03 to e4db632 Compare July 29, 2024 14:29
@augustoccesar augustoccesar changed the title fix: linting issues from Rust 1.80 fix(next): linting issues from Rust 1.80 Jul 29, 2024
@arlyon arlyon merged commit 48d4653 into arlyon:next Jul 31, 2024
15 checks passed
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
0