fix(csharp): fall back to the standard driver entrypoint - #4815
Merged
CurtHagenlocher merged 3 commits intoOct 2, 2026
Merged
Conversation
Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Manifest-based loading still omits the fallback, and the regression test fails rather than skips without its fixture.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds fallback loading through the standard AdbcDriverInit symbol when a filename-derived entrypoint is unavailable.
Changes:
- Adds native entrypoint fallback support.
- Preserves explicit entrypoint behavior.
- Adds a NativeAOT regression test.
| File | Description |
|---|---|
CAdbcDriverImporter.cs |
Implements fallback symbol lookup. |
AdbcDriverManager.cs |
Uses fallback for directly loaded native drivers. |
AotFixtureTests.cs |
Tests standard-entrypoint fallback. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
|
Hmm... I should have waited for the Copilot review apparently ;). Both of the points raised look valid to me. |
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.

Description
When a native driver does not export the filename-derived entrypoint, the C# driver manager now retries the standard AdbcDriverInit symbol, matching the behavior of the other driver managers. Explicit caller-provided entrypoints remain authoritative.
The AOT fixture regression renames a library that exports only AdbcDriverInit and loads it through AdbcDriverManager, covering the fallback path. On Windows, the test leaves its copied fixture in the disposable CI workspace because DriverManager intentionally keeps native drivers loaded for the process lifetime and Windows cannot delete a loaded DLL.
Fixes #4630
Testing
git diff --check— passeddotnet test csharp/test/Apache.Arrow.Adbc.Testing.csproj --no-restore --filter FullyQualifiedName~TomlConnectionProfileTests --framework net8.0— not run locally: dotnet is not installed in the current environmentcheck PR, and pre-commitThe AOT fixture test is skipped unless
ADBC_TEST_AOT_FIXTURE_PATHpoints to a published fixture, as in the repository CI workflow.