Conversation
…_astar
Update ARPACKFUNC and ASTAR_HEURISTIC_FUNC in types-RC.yaml to use
HEADER: '%I%' instead of HEADER: {}, so the Stimulus-generated C
functions include these SEXP parameters in their signatures. This
fixes the LTO type mismatch warnings because cpp11.cpp (derived from
R call counts) and rinterface.c (from Stimulus) now agree on the
number of parameters for R_igraph_eigen_matrix,
R_igraph_eigen_matrix_symmetric, and R_igraph_get_shortest_path_astar.
Agent-Logs-Url: https://github.com/igraph/rigraph/sessions/83d94f5a-fc61-4e0f-bd60-8a2ff9c52c2d
Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
krlmlr
April 22, 2026 07:50
View session
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.
Summary
Fixes the following LTO type mismatch warnings reported during package installation:
Root Cause
The
ARPACKFUNCandASTAR_HEURISTIC_FUNCtypes intools/stimulus/types-RC.yamlhadHEADER: {}(an empty dict, which is falsy in Python), causing Stimulus to omit these parameters from the C function signatures in the generatedrinterface.c. However:aaa-auto.Rcorrectly included these as.Call()arguments (becausetypes-RR.yamlhas noHEADERoverride for these types, so Stimulus defaults to using the parameter name)cpp11.cppis auto-generated to match the R call argument countsThis created a mismatch:
cpp11.cppdeclared/registeredR_igraph_eigen_matrixandR_igraph_eigen_matrix_symmetricwith 7 parameters andR_igraph_get_shortest_path_astarwith 6, but the corresponding C functions inrinterface.chad 6 and 5 parameters respectively.Fix
Changed
HEADER: {}toHEADER: '%I%'forARPACKFUNCandASTAR_HEURISTIC_FUNCintools/stimulus/types-RC.yaml, then regeneratedsrc/rinterface.c. The C functions now accept the SEXP parameters in their signatures (fixing the LTO mismatch) while still passing0(NULL) to the underlying igraph C calls (sinceCALL: '0'is unchanged — the R-level callback values are received but not forwarded to C).Testing