-
Notifications
You must be signed in to change notification settings - Fork 204
query: make into sub-module #325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @Roasbeef, 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 refactors the query
package into its own independent Go module. The primary purpose of this change is to prevent potential circular dependency issues, especially in anticipation of its future integration and use within the btcd
project. This modularization enhances the project's dependency management and overall code organization.
Highlights
- Module Refactoring: The existing
query
package has been extracted and converted into an independent Go module (github.com/lightninglabs/neutrino/query
). - Dependency Management: The main
go.mod
file now includes the newquery
module as a local replacement, and its owngo.mod
defines its specific dependencies, preventing circular dependency issues with projects likebtcd
. - Go Version Update: The project's Go version has been updated from 1.23.6 to 1.24.4 across both the main module and the new
query
sub-module. - Dependency Updates: Updated
btclog
tov1.0.0
andtestify
tov1.10.0
in the main module, and these updated versions are also reflected in the newquery
module's dependencies.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
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 issue 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
-
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. ↩
There was a problem hiding this 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 refactors the query
package into its own Go submodule. This is a good structural change to avoid circular dependencies and allow the query
package to be used independently. The changes primarily involve updating go.mod
and go.sum
files. My main feedback is to ensure that the dependencies in the new query/go.mod
are aligned with the dependencies in the root go.mod
to maintain consistency and prevent potential issues.
go 1.24.4 | ||
|
||
require ( | ||
github.com/btcsuite/btcd v0.24.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version of btcd
used in this submodule (v0.24.2
) is different from the version used in the main module (v0.24.3-0.20250318170759-4f4ea81776d6
). To ensure consistency and avoid potential build or runtime issues, it's recommended to use the same version of btcd
across all modules in the repository.
After updating the btcd
version, please run go mod tidy
in the query
directory to align indirect dependencies as well. For example, golang.org/x/crypto
and golang.org/x/sys
seem to be using older versions here compared to the root module.
github.com/btcsuite/btcd v0.24.3-0.20250318170759-4f4ea81776d6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! pending this one #325 (comment)
) | ||
|
||
go 1.23.6 | ||
go 1.24.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We perhaps want to update the tools/Dockerfile
to reflect this currently updated go version as currently linter complains
Line 1 in 9bf820e
FROM golang:1.23.6-bookworm |
@Roasbeef, remember to re-request review from reviewers when ready |
Will hold off on merging this for now. We're regrouping a bit re the parallel block download feature for |
We may start to use this in
btcd
, wanting to avoid any circualr dep issues like we're hammering out in btcsuite/btcd#1825.