Skip to content
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

An attempt to establish go mods throughout AGI and changing namespace… #1227

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

GOOG-sergiu
Copy link
Collaborator

@GOOG-sergiu GOOG-sergiu commented Oct 12, 2022

… (gapid => agi)

Note: go mod only indexes packages which have at least a go file declared. As such there is a need to add dummy.go files in .proto services. Although it might appear hacky, this is actually standard practice across many go repos.

When go mod changes we'll need to run:
bazel run //:gazelle -- update-repos -from_file=go.mod

UPDATE: ^ doing this in presubmit.sh solves this issue. Let me know if there are any concerns with this.

Not sure if there's a hook or a way to trigger bazel to do that on build?

… (gapid => agi)

Note: go mod only indexes packages which have at least a go file declared. As such there is a need to add dummy.go files in .proto services. Although it might appear hacky, this is actually standard practice across many go repos.

When go mod changes we'll need to run:
`bazel run //:gazelle -- update-repos -from_file=go.mod`

Not sure if there's a hook or a way to trigger bazel to do that on build?
@@ -123,7 +123,7 @@ function run_enumerate_lints() {

function run_gazelle() {
echo # TODO: figure out a way to make bazel not print anything.
$BAZEL run gazelle
$BAZEL run gazelle -- update-repos -from_file=go.mod
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Modified the presubmit to read from go.mod

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.

None yet

3 participants