You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Refactor: describe each supported language once in mkconcore.py instead of repeating if/elif chains #677
Problem:mkconcore.py handles each supported language with separate if langext == ... chains: about ten of them, 56 references to langext in total. They cover runtime-file copying, the Docker build, and the posix/windows/debug script generation. Adding Julia local builds (#669) meant editing about ten places, and #648 (MATLAB literal helper files not copied) is the kind of bug this structure makes easy: one file missing from a hand-written copy list.
Proposal: describe each language once (extension, runtime files for local and docker builds, how to run, how to debug) in a small table, and have the generators loop over it. I would do it in phases, each a small PR that does not change any generated output:
the runtime-file copy blocks (the if '<lang>' in required_langs: sections), with a test that every listed runtime file exists,
the Docker build selection,
the run/debug script generation, one platform at a time.
tests/test_demo_workflows_generate.py (#674) already generates every demo workflow for every build type, so output changes would be caught.
To avoid conflicts, I would start only after the open PRs touching these chains (#669, #637, #639, #635, #672) have been merged or closed.
Does this direction work for you, or would you prefer a different structure? @pradeeban
Activity