Repository navigation
ci: Gate the compiler warnings the glue answers for, in rcc and in each - #3004
Merged
Merged
Conversation
…`each` `scripts/warnings.sh` compiles the glue in `src/` with `-Wall -Wextra -pedantic`, less `-Wunused-parameter` and `-Wcast-function-type`, and fails on a warning in a file outside `src/vendor/`; what the vendored igraph C library says is counted, never enforced. The flags reach that one compile through a makefile of its own, never `src/Makevars` or `~/.R/Makevars`. The `rcc` smoke test runs it from `custom/after-install`, and `scripts/rcc-one.sh` runs it as the new `warnings` gate on every series commit. The seven warnings the glue raised today were all in the generated `src/rinterface.c`, so they are fixed in Stimulus: an optional input passed by value is now zero-initialized, and an output without a C counterpart no longer gets an unused `SEXP`. handbook/build/warnings/ states the stance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KYsZPyv45TEMPAuop9eWMQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was prepared with Claude Code (an LLM), as the template asks to disclose.
Stance. The glue (everything in
src/outsidesrc/vendor/, including the Stimulus-generatedsrc/rinterface.candsrc/cpp11.cpp) must compile without warnings under-Wall -Wextra -pedantic -Wno-unused-parameter -Wno-cast-function-type. Warnings in the vendored igraph C library are counted but never fail anything. They get fixed upstream and arrive through the series. A warning is attributed to the file it points at, so a glue file is not blamed for what an igraph header says. This follows the model duckdb-r adopted in duckdb/duckdb-r#2620 and refined in duckdb/duckdb-r#2652, minus the vendored-scope enforcement, because rigraph has no patch stack for warning fixes. The reasons for each flag are in the newhandbook/build/warnings/README.md.What changes.
scripts/warnings.shcompiles just the ten glue objects (about 6 s with ccache) with the gate's flags and fails on a glue warning.scripts/warnings.sh vendoredcompiles the rest and only reports. The flags reach that one compile through a makefile of its own, neversrc/Makevars(CRAN rejects-Wno-*there) or~/.R/Makevars, which R CMD check would also read. duckdb-r turned its check red that way before jarl #2652.rcc: a new step incustom/after-installruns it in the smoke test only.each: a newwarningsgate inscripts/rcc-one.sh, betweencleanandcheck, with a 600 s stage budget. It applies only to commits that carry this change. A vendored commit that brings a new warning insidesrc/vendor/stays green. One that makes the glue warn gets an R-side repair like any other breakage.tools/py-stimulus): an optional input passed by value is now zero-initialized, and an output without a C counterpart no longer gets an unusedSEXP.src/rinterface.cis regenerated, with a 13-line diff. This subrepo fix belongs upstream in igraph/stimulus as well.handbook/build/warnings/, linked frombuild/and from the root. The docs-consistency check is clean.Warnings today (GCC 13.3, full build).
src/rinterface.c: five-Wmaybe-uninitializedon optional arguments and two-Wunused-variableinR_igraph_is_bipartite_coloring. This PR fixes them in the generator. The three ISO C function/object pointer conversions insrc/rinterface_extra.care left out of the report, the same exemption R CMD check makes. igraph keeps an R closure behindigraph_function_pointer_t, so the glue cannot avoid them.-Wsign-compare, 13-Wmaybe-uninitialized, 5-Wunused-valuefrom the flex lexers, plus a few others) and 144 Fortran warnings in ARPACK.-Wall -pedanticrun is clean on that count today. The existingcheckstep already fails on such a WARNING wherever it occurs, vendored code included.Verification. Locally, the glue gate fails on
main'srinterface.c(it lists the seven warnings) and passes on this branch.EACH_GATES=warnings scripts/rcc-one.shpasses, as doesscripts/each-shard-test.sh(20/20). CI's GCC 15 might find warnings that 13 does not, and this PR's own CI run is the first check of that.Generated by Claude Code