Skip to content

Refactor Compiler Warning Features, Rewire Bazel Usage, and Refresh Module/Docs#660

Open
AAmbuj wants to merge 7 commits into
eclipse-score:mainfrom
AAmbuj:amsh_refactor_gcc_clang_warning_feature
Open

Refactor Compiler Warning Features, Rewire Bazel Usage, and Refresh Module/Docs#660
AAmbuj wants to merge 7 commits into
eclipse-score:mainfrom
AAmbuj:amsh_refactor_gcc_clang_warning_feature

Conversation

@AAmbuj

@AAmbuj AAmbuj commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Restructures compiler warning feature management and aligns build/test/docs with the new layout.

  • Removes obsolete warning-trigger test sources that are no longer part of the supported warning set.
  • Moves shared compiler warning feature definitions to a common root location for reuse.
  • Updates Bazel BUILD wiring across warning rules and score targets to use the new feature path.
  • Adjusts the self-assignment unit test pattern to avoid direct self-assignment while preserving intent.
  • Refreshes quality documentation and significantly expands warning feature documentation.
  • Updates module configuration and lockfile to keep dependency/toolchain state consistent.

@AAmbuj AAmbuj force-pushed the amsh_refactor_gcc_clang_warning_feature branch from 3c6f242 to 987467b Compare July 7, 2026 07:57
@AAmbuj AAmbuj self-assigned this Jul 7, 2026
"conversion": ["-Wfloat-conversion"],
"shadow": ["-Wshadow"],
"sign_compare": ["-Wsign-compare"],
"unused_parameter": ["-Wunused-parameter"],

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed the unused flag and test cases

@@ -1,68 +1,156 @@
# Compiler Warnings Test

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated the Redmi in more details

Comment thread quality/compiler_warnings/BUILD
Comment thread quality/compiler_warnings/BUILD
Comment thread quality/quality.md
Comment thread MODULE.bazel
@@ -100,11 +100,17 @@ score_gcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gc
# score_communication_* cc_features (currently consumed by the LLVM toolchain).
SCORE_GCC_MINIMAL_WARNING_COMPILE_FLAGS = [

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

more flags were added there for cross-toolchain parity, not to make warnings stricter than intended

@AAmbuj AAmbuj marked this pull request as ready for review July 7, 2026 08:45
@eclipse-score eclipse-score deleted a comment from AAmbuj Jul 7, 2026
@eclipse-score eclipse-score deleted a comment from AAmbuj Jul 7, 2026
@AAmbuj AAmbuj force-pushed the amsh_refactor_gcc_clang_warning_feature branch from 987467b to 471ddc6 Compare July 7, 2026 12:36
Comment thread quality/compiler_warnings/clang/BUILD Outdated
cc_feature(
name = "minimal_warnings",
args = [
"//quality/compiler_warnings:default_compile_args",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Avoid doing this. This can lead to weird command lines if somebody explicitly enables both features. Instead use implies.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the catch. I've updated this to use implies. It cleans up the command-line behavior for concurrent features while keeping the shared flags organized in one place.

Comment thread quality/compiler_warnings/gcc/BUILD Outdated
cc_feature(
name = "minimal_warnings",
args = [
"//quality/compiler_warnings:default_compile_args",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

@AAmbuj AAmbuj force-pushed the amsh_refactor_gcc_clang_warning_feature branch 2 times, most recently from 89c4449 to b13d762 Compare July 8, 2026 09:14
@AAmbuj AAmbuj marked this pull request as draft July 8, 2026 09:29
@AAmbuj

AAmbuj commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

fix CI PR: #670

@AAmbuj AAmbuj force-pushed the amsh_refactor_gcc_clang_warning_feature branch from 88fa076 to 8e9c001 Compare July 8, 2026 10:02
@AAmbuj AAmbuj marked this pull request as ready for review July 9, 2026 06:33
@AAmbuj AAmbuj force-pushed the amsh_refactor_gcc_clang_warning_feature branch 3 times, most recently from 8024ed7 to 755ac5c Compare July 9, 2026 07:17
@AAmbuj AAmbuj force-pushed the amsh_refactor_gcc_clang_warning_feature branch from 755ac5c to b07f607 Compare July 9, 2026 07:59
Comment thread quality/compiler_warnings/BUILD Outdated
cc_feature(
name = "minimal_warnings",
args = [
":default_compile_args",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should not be here. You are mixing things.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed!

name = "copyable_atomic_test",
srcs = ["copyable_atomic_test.cpp"],
features = COMPILER_WARNING_FEATURES,
features = COMPILER_WARNING_FEATURES + ["-score_communication_treat_warnings_as_errors"],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please create a follow-up ticket for this or directly a PR to get rid of this again.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I all ready created a fix CI PR: #670: but Jan is saying test itself is a self assign so we cant modify.

Comment thread MODULE.bazel
llvm.toolchain(
cxx_standard = {"": "c++17"},
extra_enabled_features = [
"//quality/compiler_warnings:default_flags",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should stay.
Also ideally move the default flags out of compiler_warnings. They are not about warnings at all. They are the defaults we require to make the compilation sane. Move them to bazel/toolchains/llvm/flags.bzl

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed!

@AAmbuj AAmbuj force-pushed the amsh_refactor_gcc_clang_warning_feature branch from b07f607 to 03c8667 Compare July 9, 2026 11:01
AAmbuj added 7 commits July 9, 2026 16:38
…gn test

The self-assignment test intentionally triggers -Wself-assign-overloaded,
which is promoted to an error by the score_communication_treat_warnings_as_errors
feature. Disable this feature for the copyable_atomic_test target so the
intentional self-assignment compiles without failing the build.
@AAmbuj AAmbuj force-pushed the amsh_refactor_gcc_clang_warning_feature branch from 03c8667 to aa5e66b Compare July 9, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants