Skip to content

Conversation

@user202729
Copy link
Contributor

@user202729 user202729 commented Dec 19, 2025

Avoid errors of the form fixed in the dependencies below.

We only do this in the CI instead of modifying meson.build so that if the user's compile somehow doesn't have the flag or is otherwise stricter etc., the compilation does not fail for the user.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

#41311

#41314

@github-actions
Copy link

github-actions bot commented Dec 19, 2025

Documentation preview for this PR (built with commit 43124ed; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@user202729 user202729 marked this pull request as ready for review December 19, 2025 17:34
@tobiasdiez
Copy link
Contributor

if the user's compile somehow doesn't have the flag or is otherwise stricter etc., the compilation does not fail for the user.

Can you explain this in more detail? Why is https://mesonbuild.com/Adding-arguments.html not working to always upgrade the warning to an error? I think it would be handy to have the local compilation fail iff the CI fails.

@user202729
Copy link
Contributor Author

there are several things that may differ from user's machine and CI:

  • compiler used (not everyone use gcc, they may use say tcc, zig cc, etc. which may not have this warning flag)
  • compiler version (maybe some future gcc version is stricter and can diagnose more such cases)
  • dependency version (maybe some dependency causes such a warning, or make a breaking change of the form changing a non-const function argument to const, creating a new warning on the caller)

unless we stress test all compilers/versions in existence, better be safe.

@tobiasdiez
Copy link
Contributor

there are several things that may differ from user's machine and CI:

* compiler used (not everyone use gcc, they may use say tcc, zig cc, etc. which may not have this warning flag)

You can easily test for compiler features in meson.

@user202729
Copy link
Contributor Author

but not the other 2 points.

@cxzhong
Copy link
Contributor

cxzhong commented Dec 22, 2025

Can you rebase this, because #40980 edit this

@tobiasdiez
Copy link
Contributor

but not the other 2 points.

Sure, but couldn't you apply these arguments to every element related to the compilation process? An the inversion of those points is also true: maybe now the meson-ci will complain about a discarded qualifier but there is no way to locally reproduce this using a different compiler.

I would say if you add it to meson and all CI is green (on all platforms that we test), then there is a high chance that it will work on other configs as well. But it's not super important and I'll not insist that you have to add the flag in meson instead of in the CI.

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.

3 participants