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

Resolve go.mod issue with direct dependency on planetscale/tengo #8383

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

shlomi-noach
Copy link
Contributor

@shlomi-noach shlomi-noach commented Jun 24, 2021

https://github.com/planetscale/tengo is a fork of https://github.com/skeema/tengo, where we add Vitess-specific code that is not likely to fit skeema/tengo.

Until today, we did a replace github.com/skeema/tengo => github.com/planetscale/tengo v0.9.6-ps.v3 in go.mod. This worked well for complete Vitess builds (make build etc).

However, we found out that in partial builds, such as in go get vitess.io/vitess/go/cmd/vtctlclient, go does not resolve the redirect correctly.

With this PR, we directly import planetscale/skeema. We also renamed planetscale/tengo's module name itself in planetscale/tengo#8 and tagged that as v0.9.6-ps.v4.

Related Issue(s)

Issue by community in slack.

Checklist

  • Tests were added or are not required
  • Documentation was added or is not required

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Copy link
Collaborator

@vmg vmg left a comment

Choose a reason for hiding this comment

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

This is indeed what I had in mind. Have you verified that this fixes the issue when go getting the subpackage?

@shlomi-noach
Copy link
Contributor Author

Have you verified that this fixes the issue when go getting the subpackage?

Not sure how to do that while the PR is unmerged? Tried:

$ go get vitess.io/vitess/go/cmd/vtctlclient@c2cfb0ebfd424a308c0445b097c9d24bdfa20ab4
go get: vitess.io/vitess/go/cmd/vtctlclient@c2cfb0ebfd424a308c0445b097c9d24bdfa20ab4: invalid version: unknown revision c2cfb0ebfd424a308c0445b097c9d24bdfa20ab4

@shlomi-noach
Copy link
Contributor Author

hmmm the reason this won't work is that the PR comes from planetscale/vitess

@shlomi-noach
Copy link
Contributor Author

shlomi-noach commented Jun 24, 2021

You know something, I don't even know what vitess.io resolves to in go get vitess.io/vitess/go/cmd/vtctlclient. How does this module get synced with GitHub?

@vmg
Copy link
Collaborator

vmg commented Jun 24, 2021

@shlomi-noach: it's a n HTML <meta> trick on the vitess.io domain, and yes, I'm afraid that we'll need to merge this PR to test this live.

Here are the full docs FWIW: https://golang.org/cmd/go/#hdr-Remote_import_paths

@vmg vmg merged commit be0630b into vitessio:main Jun 24, 2021
@vmg vmg deleted the skeema-tengo-go-mod branch June 24, 2021 14:51
@vmg
Copy link
Collaborator

vmg commented Jun 24, 2021

This actually worked 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants