Add stringoutclass attribute to global element, defaulting to baseclassname#238
Draft
Add stringoutclass attribute to global element, defaulting to baseclassname#238
stringoutclass attribute to global element, defaulting to baseclassname#238Conversation
Co-authored-by: martinweismann <30837766+martinweismann@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix stringoutclass default to baseclass and global function support
Add Feb 26, 2026
stringoutclass attribute to global element, defaulting to baseclassname
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.
The
globalelement lacked a configurable class type for the error method's instance parameter — it was hardcoded tobaseclassname. This adds an optionalstringoutclassattribute that defaults tobaseclassnamewhen unspecified, enabling components to designate a different class for error string propagation.Changes
Source/componentdefinition.goStringOutClass stringfield (stringoutclassXML attr) toComponentDefinitionGlobalStringOutClasstoBaseClassNameinCheckComponentDefinitionwhen absentstringoutclassreferences an existing classCheckHeaderSpecialFunction: error method's first param class is now validated againstStringOutClassinstead ofBaseClassNameSource/buildimplementationcpp.goIBaseClassNameinbuildCPPInterfaceWrappernow usesStringOutClasswriteCImplementationMethodcalls passStringOutClassinstead ofBaseClassName, so generatedhandleException/handleStdException/handleUnhandledExceptionsignatures andpIBaseClassdeclarations use the correct typeSource/ACT.xsdstringoutclassattribute toCT_GlobalSource/componentdiff.godiffGlobalnow tracksStringOutClasschangesUsage
All existing XML files without
stringoutclassare unaffected — generated output is identical to before.Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.