Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-112301: Enable warning emitting options and ignore warnings in CI#123020

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@nohlson
Copy link
Contributor

@nohlsonnohlson commentedAug 14, 2024
edited by bedevere-appbot
Loading

This PR introduces new compiler options that only emit warnings and don't affect runtime performance and some improvements to the warning check tooling.

Warning check tooling improvements:

  • Clang output parser can pull out the option that triggered the warning
  • A path prefix argument to the script that will belstrip() from the file path parsed from the compiler output
  • For each file with unexpected warnings a summary will be printed with the number of warnings found vs. expected
  • For each file with unexpected improvements a summary will be printed with the number of warnings found vs. expected

Compiler options enabled:

  • -Wconversion
  • -Wimplicit-fallthrough
  • -Werror=format-security
  • -Wbidi-chars=any
  • -Wall

This PR also modifies the reusable-macos and reusable-ubuntu jobs so that compiler output is only written to a file and warning checking is only performed on the specific jobs that we want:

  • macos-14 non-free-threading
  • ubuntu non-free-threading

All warnings have been added to the warning ignore files for the respective platforms.

This is one step in theroadmap for compiler hardening.

devdanzin reacted with thumbs up emoji
nohlsonand others added30 commitsJuly 23, 2024 03:14
Copy link
Contributor

@sethmlarsonsethmlarson left a comment

Choose a reason for hiding this comment

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

My comments are resolved, I'll leave a +1 review.

I spoke with@nohlson privately about potentially breaking up the addition of warnings into separate pull requests so they're only "active" while we're actively remediating the individual warnings. This would minimize the chances that core developers are going to "run into" this effort slightly.

After Nate dug into it, it turns out that almost all of the existing warnings come from-Wconversion and the other options produce far fewer warnings, some of which already have pull requests out for their remediation (like-Wformat=2).

For this reason I am okay proceeding with this PR as-is as the gains from splitting up the individual options seems smaller than I originally imagined, if other devs have concerns about this approach please leave them below.

nohlson reacted with thumbs up emoji
Copy link
Member

@hugovkhugovk left a comment

Choose a reason for hiding this comment

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

We can't merge this yet because the CI is failing:

https://github.com/python/cpython/actions/runs/10609035033/job/29404117175?pr=123020

How can we fix it?

@nohlson
Copy link
ContributorAuthor

We can't merge this yet because the CI is failing:

https://github.com/python/cpython/actions/runs/10609035033/job/29404117175?pr=123020

How can we fix it?

We can't merge this yet because the CI is failing:

https://github.com/python/cpython/actions/runs/10609035033/job/29404117175?pr=123020

How can we fix it?

The warning ignore files need to be updated immediately before merging. This is because any warnings that have merged tomain since the last timemain was pulled in will introduce warning diffs.

sethmlarson and hugovk reacted with thumbs up emoji

Copy link
Member

@hugovkhugovk left a comment

Choose a reason for hiding this comment

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

Unsurprisingly there were new warnings when mergingmain in again, but the CI error message was useful: it told me which file had a different number of warnings, and linked to the devguide instructions on how to update.

Thanks@nohlson, let's merge!

sethmlarson reacted with heart emoji
@hugovkhugovkenabled auto-merge (squash)September 13, 2024 13:34
@hugovkhugovk merged commitcfe6074 intopython:mainSep 13, 2024
hugovk added a commit to hugovk/cpython that referenced this pull requestSep 13, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@sethmlarsonsethmlarsonsethmlarson left review comments

@hugovkhugovkhugovk approved these changes

@corona10corona10Awaiting requested review from corona10corona10 is a code owner

@ezio-melottiezio-melottiAwaiting requested review from ezio-melottiezio-melotti is a code owner

@erlend-aaslanderlend-aaslandAwaiting requested review from erlend-aaslanderlend-aasland is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@nohlson@hugovk@erlend-aasland@sethmlarson

[8]ページ先頭

©2009-2025 Movatter.jp