Repository navigation
fix(codegen): declare the record argument parser the C collection runtime calls - #2167
Queued
devin-ai-integration[bot] wants to merge 1 commit into
Queued
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
…time calls cRecSeqRuntime instantiated the sequence template over records, whose parse_seq calls sysml_parse_rec, which nothing emitted; gcc 15 makes the implicit declaration an error. CFlags now carries -Werror=implicit-function-declaration and -Werror=int-conversion so every compiler reports such an omission, and a test builds a record-sequence calc under them. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
5 of 6 tasks
devin-ai-integration
Bot
added this pull request to the merge queue
Nov 12, 2026
Any commits made after this event will not be merged.
This branch has not been deployed
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.
What and why
tests/codegen(TestCompiledCalcsAgreeWithInterpreter,TestCompiledStepBudgetMatchesInterpreter) started failing onubuntu-latest= ubuntu-26.04 withcc failed … Rec::InSeq.c:2628: implicit declaration of function 'sysml_parse_rec'. Root cause:cRecSeqRuntimeinstantiates the collection template over records, whosesysml_parse_seq_reccallssysml_parse_rec, and nothing ever emitted that function — older gcc only warned, gcc 15 (C23 defaults) refuses. The emitter now declares it, assysml_parse_fnalready is for function values (a record cannot be given as a command-line argument, so it reports and exits 2).So this cannot come back on any compiler,
codegen.CFlagscarries-Werror=implicit-function-declaration -Werror=int-conversion(gcc 15's defaults, accepted by every gcc and clang), andTestCRecordSequencesBuildUnderStrictDeclarationscompiles a calc holding a record sequence (HoldsMany, added to the record model) underCFlags; it fails ondevelopwith the gcc-15 message and passes here.Follow-up to the ubuntu-24.04 pin (#2165): with this the generated C builds on 26.04 as well.
How it was verified
go test -count=1 ./internal/translate/codegen ./tests/codegengreen under the newCFlags(tests/codegen 292 s); the new test fails with the fix reverted (implicit declaration of function 'sysml_parse_rec').go build ./...,go vet,gofmt -l .clean;python3 scripts/changelog.py check.Checklist
make testandmake lintpass locally (the codegen packages above; CI runs the rest)changes/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (none moved)F4,K5) in the body, docs, or changelogLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/a8e2a2c0d31143598a07d32facbf02fa
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/a8e2a2c0d31143598a07d32facbf02fa?variant=devin
Requested by: @HuiJun
🟢 Devin Review found nothing to fix · View findings