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

Woke v0.18.0 fails to install from source due to replace directive #181

Closed
BlueMonday opened this issue Mar 19, 2022 · 6 comments · Fixed by #182
Closed

Woke v0.18.0 fails to install from source due to replace directive #181

BlueMonday opened this issue Mar 19, 2022 · 6 comments · Fixed by #182
Labels
bug Something isn't working

Comments

@BlueMonday
Copy link

BlueMonday commented Mar 19, 2022

Hello! Recently we started running into issues installing woke. After some investigation it seems to be due to this recent change: #117.

Currently we are installing woke by running:

go install github.com/get-woke/woke@latest

Unfortunately after the recent changes it now results in this error:

  go: downloading github.com/get-woke/woke v0.18.0
  go install github.com/get-woke/woke@latest: github.com/get-woke/woke@v0.18.0
  	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.

Reading through the woke docs, the recommended way to install from source is to run:

go get -u github.com/get-woke/woke

However, the recommended command results in a warning:

go get: installing executables with 'go get' in module mode is deprecated.
	Use 'go install pkg@version' instead.
	For more information, see https://golang.org/doc/go-get-install-deprecation
	or run 'go help get' or 'go help install'.

Reading through the document linked in the warning, it seems like this method will stop working in Go 1.18. The document recommends using go install instead. Unfortunately go install doesn't like replace directives. I found this thread in the Go issue tracker discussing it: golang/go#44840. Please correct me if I have said anything that is incorrect or partially incorrect. This is my first time running into this issue with a tool.

I didn't look into the context of why the replace directive was added to woke. I am not sure if it is easy to remove or if there is a better solution that achieves all of the desired goals.

My current workaround is to install v0.17.0 instead of latest.

@BlueMonday BlueMonday added the bug Something isn't working label Mar 19, 2022
@github-actions
Copy link
Contributor

👋 Thanks for submitting your first issue!

Please be sure to read and follow our Code of Conduct and Contributing guide.

⭐️ Is your org or open source project using woke? If so, we'd love for you to be included in the 'Who uses woke' list at https://github.com/get-woke/woke/blob/main/docs/about.md#who-uses-woke.

@caitlinelfring
Copy link
Member

Thanks for reporting @BlueMonday! Can you confirm what version of go you're encountering this error with?

It seems like the replace directive should be remove to support future go versions. The context for that change is here.

It also seems like the documentation needs to be updated to support go's deprecation of go get for installing executables.

@BlueMonday
Copy link
Author

BlueMonday commented Mar 19, 2022

Thanks for reporting @BlueMonday! Can you confirm what version of go you're encountering this error with?

Hello! Sorry, I should have included that.

I confirmed that the issue occurs with these two specific Go versions: 1.17.5 and 1.16.5. I think it would be safe to assume the issue would impact all 1.17 and 1.16 versions. I think it would also affect all Go 1.18 versions but I haven't gotten a chance to test using a 1.18 version.

@caitlinelfring
Copy link
Member

Thanks!

I have two PRs open to resolve this:

@caitlinelfring caitlinelfring linked a pull request Mar 19, 2022 that will close this issue
3 tasks
@caitlinelfring
Copy link
Member

This should be fixed in v0.18.1 and you should be able to go back to go install github.com/get-woke/woke@latest

@BlueMonday
Copy link
Author

This should be fixed in v0.18.1 and you should be able to go back to go install github.com/get-woke/woke@latest

Thank you for the really quick turnaround! Really appreciate it! Will switch back to using latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants