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

Use -Werror in CI #237

Merged
merged 1 commit into from
Oct 1, 2024
Merged

Use -Werror in CI #237

merged 1 commit into from
Oct 1, 2024

Conversation

JelteF
Copy link
Collaborator

@JelteF JelteF commented Oct 1, 2024

The PG15 support that was introduced in #180 introduced a bunch of warnings when compiling. To avoid getting numb to warnings, this adds the -Werror to our CI builds, so we catch warnings before merging to main.

This also starts to ignore the register warning which was introduced by PG15 support.

The PG15 support that was introduced in #180 introduced a bunch of
warnings when compiling. To avoid getting numb to warnings, this adds
the -Werror to our CI builds, so we catch warnings before merging to main.

This also starts to ignore the register warning which was introduced by
PG15 support.
@JelteF JelteF added the testing Improves testing and/or CI label Oct 1, 2024
@JelteF JelteF added this to the 0.1.0 code complete milestone Oct 1, 2024
@@ -113,7 +113,7 @@ jobs:
id: build
run: |
pushd duckdb
make -j8 install
make -j8 install CFLAGS=-Werror CXXFLAGS=-Werror
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not using it in the Makefile as well? Too annoying in dev cycles?
In this case, maybe we want a dedicated make target?

Copy link
Collaborator Author

@JelteF JelteF Oct 1, 2024

Choose a reason for hiding this comment

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

Why not using it in the Makefile as well? Too annoying in dev cycles?

Yeah, many warnings don't really matter during development (e.g. unused variable).

Also, Having -Werror on by default is bound to break builds when users compile using newer compilers than our CI does. e.g. people that create packages for distros hate it when people set -Werror.

If there's specific warnings that we think we should always treat as an error, we can do that in the makefile by default though. e.g. one I usually set to error is -Werror=return-type. But let's do that in a separate PR.

In this case, maybe we want a dedicated make target?

That would kinda explode the make targets I think, because we'd need an additional make target for all/install/installcheck and maybe more. So I think the solution in this PR is probably easiest.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Fair enough - if we need this we can always add it later.

@JelteF JelteF merged commit dd698a6 into main Oct 1, 2024
4 checks passed
@JelteF JelteF deleted the werror-in-ci branch October 1, 2024 10:02
JelteF added a commit that referenced this pull request Oct 3, 2024
wuputah pushed a commit that referenced this pull request Oct 3, 2024
It seems my `-Werror` flag addition was waiting until the next time CI
thought
it was necessary to rebuild DuckDB to blow up our build. This reverts
the
change for now to fix the build on the main branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Improves testing and/or CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants