Conversation
Summary of ChangesHello @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 Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.csprojshould also be removed to avoid confusion. - If native support is intended to be kept, the logic in
SpannerPool.csshould be restored, andspanner-ado-net.csprojshould be updated to includeProjectReferences 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 | |||
There was a problem hiding this comment.
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
| <!-- 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)' != ''" /> |
No description provided.