Use bidirectional marshallers for elements.#90056
Conversation
|
Tagging subscribers to this area: @dotnet/interop-contrib Issue DetailsFixes #89893 Also updates the analyzer to require the element shapes to be bidirectional in all cases. Technically this is a source-breaking change in the analyzer, but since it can be suppressed like all analyzers, I'm not sure if we need to fill out a breaking-change form.
|
…t we have COM involved
…ectional in the generator. Only require it if a marshaller is explicitly Element*. Aka, only enforce the requirement in the analyzer, not the generator.
|
I've figured out a way to limit the breaking change to cases where the user explicitly specifies the I found one user outside of dotnet/runtime and dotnet/samples that uses the Element marshaller modes specifically: https://grep.app/search?q=MarshalMode.Element. If we're not sure, we can also merge this into .NET 9 as soon as we branch. @AaronRobinsonMSFT @elinor-fung what do you think? |
That looks like a rather popular library. How impactful will this be to them? |
|
They should be able to change the marshaller that they're using to the stateless marshaller that they already have for the ElementRef case. I can also try to make the errors into warnings for the Element modes (like we do with the Default mode) to reduce the impact further. |
…the repo. Update analyzer unit and integration tests.
1b0d70c to
52bcc07
Compare
|
Added When you commit this breaking change:
Tagging @dotnet/compat for awareness of the breaking change. |
|
@jkoritzinsky I'm seeing from Linux and Windows libraries builds on my PR (#90166) |
|
@lambdageek I think I merged a PR with a new test type that this PR warns on between when this passed CI and when it was merged. I'll get a fix out, thanks for the head up! edit: PR is here: #90176 |
Fixes #89893
Also updates the analyzer to require the element shapes to be bidirectional in all cases.
Technically this is a source-breaking change in the analyzer, but since it can be suppressed like all analyzers, I'm not sure if we need to fill out a breaking-change form.