Skip to content

chore: import SpannerLib as git submodule#659

Closed
olavloite wants to merge 1 commit intomainfrom
ado-net-git-module
Closed

chore: import SpannerLib as git submodule#659
olavloite wants to merge 1 commit intomainfrom
ado-net-git-module

Conversation

@olavloite
Copy link
Collaborator

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @olavloite, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant change in how the SpannerLib dependencies are managed within the project. By integrating go-sql-spanner as a Git submodule, the project transitions from consuming pre-built NuGet packages to directly referencing and building the spannerlib-dotnet components from source. This approach aims to provide greater control over the build process and ensures consistency with the upstream SpannerLib development, while also streamlining the internal SpannerPool logic by focusing solely on the gRPC implementation.

Highlights

  • Submodule Integration: The go-sql-spanner repository has been integrated as a Git submodule, located at spanner-ado-net/go-sql-spanner, to manage SpannerLib dependencies directly from source.
  • Dependency Management Shift: Existing NuGet package references to Alpha.Google.Cloud.SpannerLib and its related components have been replaced with direct project references to the corresponding spannerlib-dotnet projects within the newly added submodule.
  • SpannerPool Simplification: The SpannerPool.cs file has been updated to remove support for the native SpannerLib implementation, consolidating the logic to exclusively use the gRPC-based ISpannerLib.
  • Build System Updates: Solution and project files (.sln, .csproj) have been extensively modified to incorporate the new submodule projects, manage their dependencies, and ensure proper packaging of native runtimes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request transitions the project from using NuGet packages for SpannerLib to using a git submodule containing the go-sql-spanner repository. This is a significant architectural change that involves updating project files to use project references and modifying the solution file. My review has identified a few key areas for improvement:

  • Submodule URL: The submodule is configured with an SSH URL. Switching to HTTPS would improve accessibility for contributors and CI systems.
  • Native Library Support: There's a critical inconsistency regarding native library support. The code has been modified to exclusively use the gRPC implementation, while the project file is configured to package native binaries. This needs clarification to ensure the library functions as intended.
  • Build Script Cleanliness: A debug message in the main project's build script should be removed to avoid verbose build logs.

return value;
}
var pool = Pool.Create(UseNativeLib ? NativeSpannerLib : GrpcSpannerLib, dsn);
var pool = Pool.Create(GrpcSpannerLib, dsn);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This change removes the logic for using the native Spanner library implementation (SharedLibSpanner), effectively hardcoding the use of GrpcSpannerLib. This is a significant functional change, as it drops support for the native library which was previously configurable via the SPANNER_ADO_USE_NATIVE_LIB environment variable.

This also seems to contradict the changes in spanner-ado-net.csproj, which adds MSBuild logic to package native runtimes (runtimes/any/native/*, etc.).

  • If native support is being intentionally removed, the packaging logic for native runtimes in spanner-ado-net.csproj should also be removed to avoid confusion.
  • If native support is intended to be kept, the logic in SpannerPool.cs should be restored, and spanner-ado-net.csproj should be updated to include ProjectReferences to the native implementation projects from the submodule (e.g., spannerlib-dotnet-native-impl.csproj).

Please clarify the intent of this change.

@@ -0,0 +1,3 @@
[submodule "spanner-ado-net/go-sql-spanner"]
path = spanner-ado-net/go-sql-spanner
url = git@github.com:googleapis/go-sql-spanner.git

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The submodule URL is using the SSH protocol (git@...). For better portability and to avoid potential issues in CI/CD environments or for contributors who have not set up SSH keys, it is recommended to use the HTTPS protocol for submodules in public repositories.

	url = https://github.com/googleapis/go-sql-spanner.git

Comment on lines +49 to +50
<!-- Print batches for debug purposes -->
<Message Text="Batch for .nupkg: ReferenceCopyLocalPaths = @(_ReferenceCopyLocalPaths), ReferenceCopyLocalPaths.DestinationSubDirectory = %(_ReferenceCopyLocalPaths.DestinationSubDirectory) Filename = %(_ReferenceCopyLocalPaths.Filename) Extension = %(_ReferenceCopyLocalPaths.Extension)" Importance="High" Condition="'@(_ReferenceCopyLocalPaths)' != ''" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This <Message> task with Importance="High" appears to be for debugging purposes. It's best to remove such verbose, high-importance logging from build scripts before merging to keep the build output clean for all developers and CI systems.

@olavloite olavloite closed this Jan 23, 2026
@olavloite olavloite deleted the ado-net-git-module branch January 23, 2026 08:55
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.

1 participant