Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Do not allow code with warnings to pass CI #2544

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ build --@dawn//src/tint:tint_build_wgsl_writer=True
# Our dependencies (ICU, zlib, etc.) produce a lot of these warnings, so we disable them. Depending
# on the clang version, zlib either produces warnings for -Wdeprecated-non-prototype or does not
# have that option, so disable -Wunknown-warning-option there too.
build --per_file_copt='external@-Wno-error'
build --per_file_copt='external/v8@-Wno-deprecated-declarations'
build --per_file_copt='external/com_googlesource_chromium_icu@-Wno-ambiguous-reversed-operator,-Wno-deprecated-declarations'
build --host_per_file_copt='external/com_googlesource_chromium_icu@-Wno-ambiguous-reversed-operator,-Wno-deprecated-declarations'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ jobs:
sudo apt-get install -y --no-install-recommends clang-16 lld-16 libunwind-16 libc++abi1-16 libc++1-16 libc++-16-dev libclang-rt-16-dev
echo "build:linux --action_env=CC=/usr/lib/llvm-16/bin/clang --action_env=CXX=/usr/lib/llvm-16/bin/clang++" >> .bazelrc
echo "build:linux --host_action_env=CC=/usr/lib/llvm-16/bin/clang --host_action_env=CXX=/usr/lib/llvm-16/bin/clang++" >> .bazelrc
echo "build:linux --copt='-Werror'" >> .bazelrc
echo "build:linux --copt='-Wno-error=#warnings'" >> .bazelrc
echo "build:linux --copt='-Wno-error=deprecated-declarations'" >> .bazelrc
npaun marked this conversation as resolved.
Show resolved Hide resolved
sed -i -e "s%llvm-symbolizer%/usr/lib/llvm-16/bin/llvm-symbolizer%" .bazelrc
- name: Setup macOS
if: matrix.os.name == 'macOS'
Expand Down
3 changes: 2 additions & 1 deletion src/workerd/io/worker.c++
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,8 @@ Worker::Worker(kj::Own<const Script> scriptParam,
}
KJ_CASE_ONEOF(limitError, kj::Exception) { }
}
}
} else {} // Added to suppress a compiler warning

startupMetrics->done();
} catch (const kj::Exception& e) {
lock.throwException(kj::cp(e));
Expand Down
Loading