refactor(ffi): annotate Diplomat getters, setters and disposable types - #538
Open
irvingouj@Devolutions (irvingoujAtDevolution) wants to merge 1 commit into
Conversation
Adds the `#[diplomat::attr(...)]` markers the next Diplomat needs: - 174 getter/setter names, since it no longer turns `get_`/`set_` prefixes into C# properties - 95 `manually_disposable` opt-ins, so those types stay `IDisposable` - a comment on the 3 opaque types that can't opt in The Diplomat pinned today drops these attributes, so the generated C# doesn't change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
irvingouj@Devolutions (irvingoujAtDevolution)
added this pull request to stack #540
September 29, 2026 18:56
irvingouj@Devolutions (irvingoujAtDevolution)
marked this pull request as ready for review
September 29, 2026 19:24
This branch has not been deployed
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.
Adds the
#[diplomat::attr(...)]markers the new Diplomat in #536 needs, so that PR only has the actual migration:get_/set_prefixes into properties anymore, so each name here should match the property already inGenerated/.manually_disposable, so those types stayIDisposableonce it's opt-in.AlgorithmIdentifier,AuthenticodeSignature,Extension), they hand out views borrowing fromself.The Diplomat we pin today drops these attrs, so there's no generated diff. I checked by regenerating with the pinned tool. Heads up, that tool can't regenerate master as-is: its syn chokes on
#[unsafe(no_mangle)], so I swapped in#[no_mangle]locally for the check.Tested: clippy clean,
Devolutions.Picky.Tests26/26 locally.