Skip to content

[codex] Make mod-check use Go module proxy#1142

Closed
hieblmi wants to merge 1 commit into
lightninglabs:masterfrom
hieblmi:fix-gomod
Closed

[codex] Make mod-check use Go module proxy#1142
hieblmi wants to merge 1 commit into
lightninglabs:masterfrom
hieblmi:fix-gomod

Conversation

@hieblmi
Copy link
Copy Markdown
Collaborator

@hieblmi hieblmi commented May 20, 2026

Summary

  • Update make mod-check to use GOPROXY=https://proxy.golang.org,direct instead of forcing GOPROXY=direct.
  • Apply the same proxy setting to the root module, swapserverrpc, looprpc, and tools tidy checks.

Rationale

The direct-only module fetch path can hit transient Git shallow-clone cache failures for public transitive dependencies, such as modernc.org/ccgo/v3 via github.com/golang-migrate/migrate/v4. Using the public Go module proxy first avoids flaky direct VCS fetches while preserving direct as a fallback.

Validation

  • make mod-check

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, 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 improves the reliability of the module dependency check process by switching from a direct-only VCS fetch to using the public Go module proxy. This change helps mitigate transient network or cache issues encountered when fetching public transitive dependencies, while still maintaining direct access as a fallback.

Highlights

  • Go Module Proxy Configuration: Updated the GOPROXY environment variable in the mod-check Makefile target to use https://proxy.golang.org,direct instead of direct.
  • Improved Dependency Resolution Reliability: Enabled the public Go module proxy to mitigate transient Git shallow-clone failures when fetching public transitive dependencies.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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 the 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 counterproductive. 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.

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.

@hieblmi hieblmi closed this May 20, 2026
Copy link
Copy Markdown

@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 updates the GOPROXY configuration in the Makefile to use the official Go proxy before falling back to direct connections. A review comment suggests defining a variable for these settings to avoid repetition and improve maintainability.

Comment thread Makefile
Comment on lines +159 to +162
GOPROXY=https://proxy.golang.org,direct $(GOMOD) tidy
cd swapserverrpc/ && GOPROXY=https://proxy.golang.org,direct $(GOMOD) tidy
cd looprpc/ && GOPROXY=https://proxy.golang.org,direct $(GOMOD) tidy
cd tools/ && GOPROXY=https://proxy.golang.org,direct $(GOMOD) tidy
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The GOPROXY configuration is repeated four times within the mod-check target. While this is explicit, it introduces a maintainability issue as any future changes to the proxy settings (e.g., adding a different mirror or changing the fallback behavior) would need to be updated in multiple places. Consider defining a Makefile variable for these settings to adhere to the DRY (Don't Repeat Yourself) principle.

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