Skip to content

fix: single quote the .m file name in windows run and debug scripts - #637

Open
bhuvan-somisetty wants to merge 3 commits into
ControlCore-Project:devfrom
bhuvan-somisetty:fix/windows-matlab-run-quotes
Open

bhuvan-somisetty wants to merge 3 commits into
ControlCore-Project:devfrom
bhuvan-somisetty:fix/windows-matlab-run-quotes

Conversation

@bhuvan-somisetty

@bhuvan-somisetty bhuvan-somisetty commented Nov 4, 2026 •

Copy link
Copy Markdown

Fixes #636

The windows MATLAB and Octave lines in mkconcore.py now put the file name in single quotes, so run.bat and debug.bat get run('cmat.m') again instead of run("cmat.m"). With the nested double quotes the tool got run(cmat.m). This is the same as the posix scripts and what it was before 991373c. Node labels already reject ', so the file name can't break out.

Added a test that builds a windows study with a .m node and checks run.bat and debug.bat. It fails on dev and passes with this change. I also ran the generated line with a script that prints its argv, and it now gets run('cmat.m'). Full suite passes.

CI on dev is red right now for two reasons unrelated to this, so I added them here to get the checks green:

@Siddhanthguptaa

Copy link
Copy Markdown

Heads-up: #639 changes the same Windows run.bat/debug.bat lines in mkconcore.py, so the two PRs will conflict (merging both locally gives a conflict in mkconcore.py). They fix different things on those lines:

So with only one of them, Octave still doesn't run from run.bat. With both applied (Windows 11, Octave 11.3, demo/sampleM.graphml), Octave starts and runs controllerM.m; on my machine it then stops at the first read with ym(1): out of bound 0 (dimensions are 0x0), which looks like a separate issue that I'm looking into.

Whichever lands second needs a small rebase. I'm happy to rebase #639 on top of this one.

@bhuvan-somisetty

Copy link
Copy Markdown
Author

Thanks for testing both together. Yeah they fix different things on that line, so rebasing #639 on top of this works for me.

@Siddhanthguptaa

Copy link
Copy Markdown

Follow-up on the read error I mentioned above: the cause is that mkconcore doesn't copy concore_literal_eval.m / concore_literal_serialize.m into generated studies, so concore_read can't parse anything (#648, fix in #649). With those copied, demo/sampleM.graphml runs the full loop on Windows together with this PR and #639.

@bhuvan-somisetty

Copy link
Copy Markdown
Author

Nice, good to know it runs end to end with all three. Thanks for tracking that down.

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