Small SDC fixes#63
Conversation
Greptile SummaryThree SDC compatibility fixes:
Confidence Score: 4/5Safe to merge; all three fixes are targeted and well-tested with new golden-output regression cases. The tcl/Collections.tcl — the plain-list branch of Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["append_to_collection called"] --> B{"upvar target\nvariable exists?"}
B -- "No (NEW)" --> C["auto-init: set coll {}"]
B -- "Yes" --> D{"is_collection?"}
C --> D
D -- "Yes (native collection)" --> E["collection_append_inplace\n(in-place mutation)"]
D -- "No (Tcl list)" --> F["collection_plus\n(functional update)"]
G["foreach_in_collection called"] --> H{"is_collection?"}
H -- "Yes" --> I["iterator path\nwith catch for break/continue/error"]
H -- "No" --> J["foreach path\nuplevel [list set var val] (FIXED)\nbody called without catch"]
I --> K["uplevel [list set var val] (FIXED)\nuplevel body with catch"]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A["append_to_collection called"] --> B{"upvar target\nvariable exists?"}
B -- "No (NEW)" --> C["auto-init: set coll {}"]
B -- "Yes" --> D{"is_collection?"}
C --> D
D -- "Yes (native collection)" --> E["collection_append_inplace\n(in-place mutation)"]
D -- "No (Tcl list)" --> F["collection_plus\n(functional update)"]
G["foreach_in_collection called"] --> H{"is_collection?"}
H -- "Yes" --> I["iterator path\nwith catch for break/continue/error"]
H -- "No" --> J["foreach path\nuplevel [list set var val] (FIXED)\nbody called without catch"]
I --> K["uplevel [list set var val] (FIXED)\nuplevel body with catch"]
Reviews (1): Last reviewed commit: "Small SDC fixes" | Re-trigger Greptile |
suppress_message](https://linear.app/silimate/issue/ENG-2223)append_to_collectionfails on empty, should be auto-initialized](https://linear.app/silimate/issue/ENG-2225)remove_input_delaydoes not work with collections, needs to be in list for some reason](https://linear.app/silimate/issue/ENG-2224)