build(csharp): restore the strong name dropped in the move from arrow-adbc - #243
Merged
CurtHagenlocher merged 2 commits intoJul 29, 2026
Merged
Conversation
…-adbc Directory.Build.props has carried <SignAssembly>true</SignAssembly> since the initial "chore: get it building" commit, but the accompanying <AssemblyOriginatorKeyFile> line and the key itself never came across from apache/arrow-adbc. SignAssembly alone is a no-op: MSBuild passes no /keyfile to the compiler, no warning is emitted, and the driver has been shipping unsigned. The published Apache.Arrow.Adbc.Drivers.BigQuery 0.23.0 carries public key token 204f54e5a45c07df, so this was a regression, not a decision. Use AdbcDrivers.snk, the same key adbc-drivers/hiveserver2 signs with, giving AdbcDrivers.BigQuery public key token f1f2cdc791f08e13. That token necessarily differs from the Apache one, but the assembly rename from Apache.Arrow.Adbc.Drivers.BigQuery had already broken that identity, and AdbcDrivers.BigQuery is not yet on nuget.org, so nothing binds to the unsigned identity today. Signing forces the InternalsVisibleTo for AdbcDrivers.BigQuery.Tests to name a public key (CS1726); a bare assembly name only compiled because the output was unsigned. Both apache/arrow-adbc and hiveserver2 spell theirs out the same way. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Moq generates its proxies into DynamicProxyGenAssembly2, which cannot subclass an internal type from a strong-named assembly without an explicit grant. No current test hits this - the types the suite mocks are public - but the failure mode is a runtime ArgumentException at Setup() rather than a compile error, so granting it now avoids an opaque failure the first time someone mocks an internal type. hiveserver2 carries the same grant. Verified by temporarily mocking the internal ITokenProtectedResource: the mock works with the grant and fails without it on both net8.0 and net472. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CurtHagenlocher
requested review from
birschick-bq,
davidhcoe,
lidavidm and
zeroshade
as code owners
July 29, 2026 03:21
davidhcoe
reviewed
Jul 29, 2026
birschick-bq
approved these changes
Jul 29, 2026
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.
What's Changed
csharp/Directory.Build.propshas carried<SignAssembly>true</SignAssembly>since the initial "chore: get it building" commit, but the accompanying<AssemblyOriginatorKeyFile>line and the key itself never came across from apache/arrow-adbc.SignAssemblyon its own is a no-op: MSBuild passes no/keyfileto the compiler, no warning is emitted, and the driver has been shipping unsigned this whole time. The publishedApache.Arrow.Adbc.Drivers.BigQuery0.23.0 carries public key token204f54e5a45c07df, so this was a regression in the move, not a decision.This adds
csharp/AdbcDrivers.snk— the same key adbc-drivers/hiveserver2 signs with — givingAdbcDrivers.BigQuerypublic key tokenf1f2cdc791f08e13, matching its sibling driver.Two consequences fall out of actually signing:
InternalsVisibleTomust name a public key (CS1726). The bareInternalsVisibleTo("AdbcDrivers.BigQuery.Tests")only compiled because the output was unsigned. Both apache/arrow-adbc and hiveserver2 spell theirs out the same way.DynamicProxyGenAssembly2, which cannot subclass an internal type from a strong-named assembly without one. No current test hits this — the types the suite mocks are public — but the failure mode is a runtimeArgumentExceptionatSetup()rather than a compile error, so granting it now avoids an opaque failure the first time someone mocks an internal type. hiveserver2 carries the same grant.csharp/AdbcDrivers.snkis added to.rat-excludes, as hiveserver2 does with theirs.Compatibility
Strictly speaking this changes assembly identity, but no published artifact is affected:
AdbcDrivers.BigQueryis not on nuget.org yet, so nothing binds to the unsigned identity today. The token also necessarily differs from Apache's204f54e5a45c07df, but the rename fromApache.Arrow.Adbc.Drivers.BigQueryhad already broken that binding. Doing this before the first publish costs nothing; after it, it would be a genuine break.Verification
CS8002, confirming every package dependency is itself strong-named.f1f2cdc791f08e13.ITokenProtectedResource: the mock works with the grant and fails without it on both TFMs, with Moq's error naming the exact public key used here.🤖 Generated with Claude Code