Skip to content

Document element marshaller infrastructure in interop generator skill#2372

Open
Sergio0694 wants to merge 3 commits intostaging/3.0from
user/sergiopedri/remove-abstract-object
Open

Document element marshaller infrastructure in interop generator skill#2372
Sergio0694 wants to merge 3 commits intostaging/3.0from
user/sergiopedri/remove-abstract-object

Conversation

@Sergio0694
Copy link
Copy Markdown
Member

Summary

Update the interop generator Copilot skill and its reference documents to comprehensively cover the element marshaller infrastructure — both SZ array element marshallers and collection element marshallers. Also optimize the interop generator skill description for compactness.

Motivation

The element marshaller types are a key part of the interop generator's code generation pipeline, providing per-element conversion logic for array and collection marshalling via static abstract interfaces. This infrastructure was previously undocumented in the skill and reference docs, making it harder for contributors and Copilot to understand how array/collection marshalling works end-to-end.

Changes

  • .github/skills/interop-generator/SKILL.md: Compact the skill description. Add element marshaller types to the "What gets generated" section for both generic interfaces and SZ arrays. Expand the Factories section to document InteropTypeDefinitionFactory and InteropMethodDefinitionFactory partials. Add element marshaller factory files to the project structure listing. Update the IEnumerator1 builder entry to note element marshaller emission.
  • .github/skills/interop-generator/references/marshalling-arrays.md: Add a new "Element marshallers" section covering: why they exist (strategy pattern via static abstract interfaces), the 5 runtime interfaces and 5 runtime array marshaller classes, the selection logic table for all 10 element type categories, generated type shape, and a concrete code example using JsonObject[] with proper name mangling.
  • .github/skills/interop-generator/references/marshalling-generic-interfaces.md: Add a new "Collection element marshallers" subsection in the CCW section covering: the 5 one-way runtime interfaces, GetMany<TElementMarshaller> adapter extension methods, the emission/reuse pattern (emitted by IEnumerator<T> builder, reused by IList<T>/IReadOnlyList<T>), and why they are one-way.
  • .github/skills/update-interop-generator-instructions/SKILL.md: Expand Step 7 (emit phase verification) to include factory and element marshaller verification criteria. Expand Step 13 (reference docs) to list specific element marshaller content to validate.

Sergio0694 and others added 2 commits March 26, 2026 17:06
Co-Authored-By: Copilot <223556219+Copilot@users.noreply.github.com>
Add comprehensive documentation for both SZ array element marshallers
and collection element marshallers across the interop generator skill
and its reference documents.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Sergio0694 Sergio0694 requested a review from manodasanW March 27, 2026 00:38
Update SKILL.md wording to simplify and clarify when the interop-generator skill should be used: replace 'Also use whenever the user asks anything related to the interop generator.' with 'Use whenever the user mentions the interop generator.' This makes the trigger condition more concise and explicit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant