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

Deny warnings in CI #2788

Merged
merged 11 commits into from
Dec 20, 2023

Conversation

tnull
Copy link
Contributor

@tnull tnull commented Dec 12, 2023

Since we recently got rid of our build/test/doc warnings, we now deny warnings via -D warnings in CI, enforcing no new ones will have to be fixed where they are introduced.

We also fix the last few warnings that only occured under certain feature configurations.

@tnull tnull marked this pull request as draft December 12, 2023 17:08
@tnull
Copy link
Contributor Author

tnull commented Dec 12, 2023

Draft since I'm still playing whack-a-mole with warnings under certain feature configs.

@TheBlueMatt
Copy link
Collaborator

IMO we should do this on a fixed rustc version, as new versions (esp beta) may introduce new warnings and we don't need to fail for them.

@tnull tnull force-pushed the 2023-12-enforce-no-warnings-ci branch from 326f555 to 6ba9f2e Compare December 16, 2023 13:27
@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4deb263) 88.46% compared to head (71748d3) 88.47%.

❗ Current head 71748d3 differs from pull request most recent head 2d6464c. Consider uploading reports for the commit 2d6464c to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2788   +/-   ##
=======================================
  Coverage   88.46%   88.47%           
=======================================
  Files         114      114           
  Lines       91806    91814    +8     
  Branches    91806    91814    +8     
=======================================
+ Hits        81214    81229   +15     
+ Misses       8112     8100   -12     
- Partials     2480     2485    +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tnull tnull force-pushed the 2023-12-enforce-no-warnings-ci branch 5 times, most recently from 95538e6 to 71748d3 Compare December 16, 2023 18:46
@tnull
Copy link
Contributor Author

tnull commented Dec 16, 2023

IMO we should do this on a fixed rustc version, as new versions (esp beta) may introduce new warnings and we don't need to fail for them.

Not sure how often warnings that made it into the beta channel are not going to be in stable down the line. That said, now switched to only enforce it in stable CI. I also took the liberty of excluding some cases (taproot, async-signing, but also liberally added allows to the log-level tests). If CI now passes this should be ready for review.

@tnull tnull marked this pull request as ready for review December 16, 2023 18:51
@TheBlueMatt
Copy link
Collaborator

Ah I meant I think we should fail but only on a specific version of rustc pinned, rather than stable/beta.

@tnull
Copy link
Contributor Author

tnull commented Dec 17, 2023

Ah I meant I think we should fail but only on a specific version of rustc pinned, rather than stable/beta.

Ah, but part of the motivation here is to get these warnings fixed ASAP once they appear? Note that the only fixed version we have available in our CI would be the MSRV, and I think for this purpose (improving dev UX, cleanup the code as we go) the stable channel seems more suited to me?

@TheBlueMatt
Copy link
Collaborator

If we want to do that we should run this as a cron job. We have enough issues with CI on PRs randomly failing, I'd really like to avoid introducing new ones.

@tnull tnull force-pushed the 2023-12-enforce-no-warnings-ci branch from 71748d3 to 2d6464c Compare December 18, 2023 07:53
@tnull
Copy link
Contributor Author

tnull commented Dec 18, 2023

If we want to do that we should run this as a cron job. We have enough issues with CI on PRs randomly failing, I'd really like to avoid introducing new ones.

Running as a cron job really makes no sense to me as we'll want to enforce that warnings are fixed before PRs get merged. I don't think it's common that a new stable release introduces new warnings? So not entirely sure if this would be an issue at all?

In any case, since you seem to feel strongly about this I now switched to check it on 1.63.0, which, while I don't think is optimal, at least should reduce the most common stuff such as unused imports, etc.

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.

LGTM. The changes are only CI, code deletion, some use rewrites, and a few cfg tags. I don't see a strong need to waste another reviewer's time on this.

@TheBlueMatt TheBlueMatt merged commit 15b7f66 into lightningdevkit:main Dec 20, 2023
13 of 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.

3 participants