-
Notifications
You must be signed in to change notification settings - Fork 33
Description
The script uses naive .split(".") parsing throughout to extract filename and extension, which breaks on any source file containing multiple dots (e.g., data.processor.py, model.v2.cpp).
Root cause:
Line 592 (and ~21 other locations) does:
dockername, langext = sourcecode.split(".")
This assumes filenames contain exactly one dot. When sourcecode = "data.processor.py", the split returns ["data", "processor", "py"], causing the tuple unpack to raise ValueError: too many values to unpack.
Affected code paths:
-
Docker workflow generation (lines 590-830): build, run, stop, clear, maxtime, params, unlock scripts
-
POSIX/Windows workflow generation (lines 845-940): build script file copying and compilation
-
POSIX/Windows execution scripts (lines 1030-1100): run and debug command generation
The pattern repeats 22 times across loops that generate shell commands for each node in the workflow graph. Since the failure occurs during the initial script generation phase, mkconcore exits before creating any output.
Proposed fix:
Replace all instances with os.path.splitext():
dockername, ext_with_dot = os.path.splitext(sourcecode)
langext = ext_with_dot[1:] # Remove leading dot
Alternatively, use sourcecode.rsplit(".", 1) to split from the right, though splitext is more robust for edge cases (hidden files, paths with dots, etc.).
This has not surfaced in testing because all example workflows use simple single-dot filenames. However, it's a blocker for any real-world usage where versioned scripts or namespaced modules are common.