Repository navigation
fix(mkconcore): copy concore_literal_eval.m and concore_literal_serialize.m for .m nodes - #649
Open
Siddhanthguptaa wants to merge 2 commits into
Conversation
…lize.m for .m nodes concore_read.m, concore_write.m, concore_initval.m and concore_default_maxtime.m call these helpers since the wire-format change, but mkconcore never copied them into out/src, so .m nodes got empty reads. Add them to the list of copied runtime files.
Generate demo/sampleM.graphml for each target and check that both literal helpers end up in src/, that no copied runtime file (concore_*.m, import_concore.m) calls a concore_* function missing from src/, and that the build script still copies src/concore_*.m into the node folder. Refs ControlCore-Project#648
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.
Fixes #648
mkconcore copies the MATLAB/Octave runtime into
out/srcfrom a fixed list. Since #575,concore_read.m,concore_write.m,concore_initval.mandconcore_default_maxtime.mcallconcore_literal_eval/concore_literal_serialize, which weren't in that list, so.mnodes got empty reads (the read's try/catch hides the "undefined function"). This adds the two files to the list, in the same style as the others. The windows, posix and docker build scripts already copysrc/concore_*.minto each node, so all three modes pick them up.Testing
test_build_command_m_node_copies_literal_helpers(tests/test_cli.py) builds a.mnode throughconcore buildand checks both files are inout/src; it fails on current dev and passes with this change.tests/test_mkconcore_matlab_runtime.pygeneratesdemo/sampleM.graphmlfor posix, windows and docker and checks that both helpers are inout/src, that no copied runtime file (concore_*.m,import_concore.m) calls aconcore_*function missing fromout/src, and that the build script still copiessrc/concore_*.minto the node. On current dev it fails for all three targets; with this change all 6 pass. The multi-target check was suggested by @yadavchiragg in MATLAB/Octave nodes get empty reads: concore_literal_eval.m / concore_literal_serialize.m are not copied into studies #648.ruff check .andruff format --check .pass.ym(1): out of bound 0; with the helpers, controller and plant run the full loop to simtime 15.The MATLAB CI job runs with the repo root on the path, which is why it didn't catch this.