Hi all – dev of Cordyceps here. I’m seeing an issue with ScriptComponent where updating an existing script fails silently if the first-line language comment is not sent again:
Replacing the source of the unified “Script” component (RhinoCodePluginGH.Components.ScriptComponent, c9b2d725-6f87-4b07-af90-bd9aefef68eb) with a body that lacks a first-line language directive (#! python 3, // #! csharp) leaves the component unable to determine its language.
At the next solution it fails with the runtime error “cannot determine input code language”. The source-setting call (BaseScriptComponent.SetSource(string) / IScriptComponent.Text) succeeds, and the failure surfaces only at solve time — so an automation/API caller has no synchronous signal that it just broke the component.
The most resilient fix would be to assume that an updated script is the same language as the previous one. But second choice would be to throw an error and return a runtime message to the SetSource caller that language spec is missing. Nice-to-have would be making the IScriptComponent.LanguageSpec property settable (would help recovery, but just using SetSource to re-push the whole script is sufficient).
Rhino 8.31, MacOS.
Lots more detail in this report (text is AI generated, but I manually validated as well).