Skip to content

style: fix the Runic format check that is red on master - #4913

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:runic-fix-initializationproblem
Aug 9, 2026
Merged

style: fix the Runic format check that is red on master#4913
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:runic-fix-initializationproblem

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Please ignore this PR until it has been reviewed by @ChrisRackauckas.

What changed and why

master is red on the Runic format check, so every open PR fails it too. Runic v1.7.0 wants an explicit return on the final expression of the InitializationProblem{iip, specialize} constructor in lib/ModelingToolkitBase/src/problems/initializationproblem.jl. This adds it. That is the whole diff — one line, no version bump (matching #4884, #4824, #4801).

The expression was already the last one in the function body, so adding return is semantically a no-op.

Where it came from

Not a Runic version bump: Runic v1.7.0 was registered 2026-04-22, months before this code landed, and CI has been resolving runic-version: "1" to it the whole time. The regression is a merge with a red check:

Verification

Reproduced CI exactly on a clean origin/master checkout at 731eff6: Runic v1.7.0 (same version CI installs — see the job log, + Runic v1.7.0), invoked the way fredrikekre/runic-action@v1 does, Runic.main(["--check", "--diff", "--verbose", git ls-files -- '*.jl'...]).

Before (on unmodified master), exit code 1:

[ 46/223] Checking `lib/ModelingToolkitBase/src/problems/initializationproblem.jl`  ✖
diff --git a/initializationproblem.jl b/initializationproblem.jl
--- a/initializationproblem.jl
+++ b/initializationproblem.jl
@@ -169,7 +169,7 @@ function InitializationProblem{iip, specialize}(
-    TProb{_iip}(
+    return TProb{_iip}(
...
n files = 223
EXIT_CODE=1

That is the only in the run — all 223 tracked .jl files were checked and no other file fails.

After this commit, exit code 0:

[ 46/223] Checking `lib/ModelingToolkitBase/src/problems/initializationproblem.jl`  ✔
...
[223/223] Checking `test/substitute_component.jl` ............................ ✔
n files = 223
EXIT_CODE=0

Zero lines in the whole run.

What I did not verify

I did not run the ModelingToolkit test suite. The change adds return to an expression that was already the function's last, so it cannot change behavior; the test suites, docs build, and downstream jobs are left to CI.

Runic v1.7.0 flags the final expression of the `InitializationProblem{iip,
specialize}` constructor for a missing explicit `return`, which has left
the format-check red on master (and therefore on every open PR) since
SciML#4893 merged.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 9, 2026 19:45
@ChrisRackauckas
ChrisRackauckas merged commit 09bd3e8 into SciML:master Aug 9, 2026
79 of 93 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants