[Investigation] Metadata.xml cannot surface Snapshot APIs - manual bindings required #1308
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.
Investigation Result: After attempting to use Metadata.xml to surface Snapshot APIs, investigation revealed that this approach is not viable due to technical limitations.
Problem Analysis
PR #1307 manually binds Snapshot APIs with 600+ lines of C# in
Additions/. Initial attempt was to replace this with Metadata.xml, but validation correctly fails with:Root Cause
The Snapshot interfaces (Snapshot, SnapshotMetadata, SnapshotContents, SnapshotsClient, etc.) do not exist in the generated API - they're filtered out during AAR parsing by the binding generator. Investigation confirmed:
javap)api.xmlfrom the binding generatormetadata-verifyvalidation explicitly blocks using<attr name="visibility">public</attr>on interfaces as policyWhy Metadata.xml Cannot Work
Conclusion
The manual C# bindings approach from PR #1307 is the correct and necessary solution. While it's 600+ lines of code, it's required because:
Recommendation
Close this PR and merge PR #1307 instead.
Related to #972
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.