Skip to content

Conversation

tannergooding
Copy link
Member

@tannergooding tannergooding commented Oct 3, 2025

In particular, the _fileContents was causing failures for --file a b cases because a was processed, then the translation unit was disposed. b was then processed and may have reused the file handle ID from a causing the key to "match" and a bad buffer to be returned.

This also resolves #636 by ensuring the ClangSharp and ClangSharp.Interop libraries multi-target .NET 8

The command line tool (ClangSharpPInvokeGenerator) must only target .NET 10 due to its dependence on RID specific deployment. Likewise, multi-targeting the ClangSharp.PInvokeGenerator library is "too complex" and would negatively impact performance due to its dependence on IAlternativeLookup<,> and the new Lock type.

@tannergooding tannergooding changed the title Ensure that GenerateBindings clears stale state to improve subsequent performance and ensure correctness Ensure state is cleared and continue to multi-target .NET 8 for the interop bindings Oct 15, 2025
@tannergooding tannergooding merged commit 92e8c55 into dotnet:main Oct 15, 2025
14 checks passed
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.

net10.0 only for 20.1.2.2+ ?

1 participant