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

Can't install Topaz with go install #523

Closed
tedb opened this issue Jan 18, 2025 · 3 comments
Closed

Can't install Topaz with go install #523

tedb opened this issue Jan 18, 2025 · 3 comments

Comments

@tedb
Copy link

tedb commented Jan 18, 2025

Hello, while trying to install Topaz using the setup instructions, I encountered an issue with go install:

$ go install github.com/aserto-dev/topaz/cmd/topaz@latest
go: github.com/aserto-dev/[email protected] requires go >= 1.23.4; switching to go1.23.5
go: github.com/aserto-dev/topaz/cmd/topaz@latest (in github.com/aserto-dev/[email protected]):
        The go.mod file for the module providing named packages contains one or
        more replace directives. It must not contain directives that would cause
        it to be interpreted differently than if it were the main module.

This prevented the Topaz binary from building. As a workaround, I had to first bring Topaz (and its dependencies) into a temporary Go module, then do a versionless install:

$ cd ~
$ mkdir topaz
$ cd topaz
$ go mod init topaz
$ go get github.com/aserto-dev/topaz/cmd/topaz@latest
$ export GOBIN=$HOME/topaz
$ go install github.com/aserto-dev/topaz/cmd/topaz
$ ~/topaz/topaz   # successfully executes

Would it be possible to make the necessary adjustments so that go install ... topaz@latest works as expected?

@gertd
Copy link
Member

gertd commented Jan 19, 2025

If you have a local clone, you should be able to use go install ./cmd/topaz/

I will look at removing the redirect; I am not sure how long-lasting this will be, as we will be moving to a mono-repo at some point in the near future, which will require redirects as well.

@gertd
Copy link
Member

gertd commented Jan 19, 2025

#524

@gertd
Copy link
Member

gertd commented Jan 22, 2025

The issue has been fixed per topaz 0.32.43+

@gertd gertd closed this as completed Jan 22, 2025
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

No branches or pull requests

2 participants