-
Notifications
You must be signed in to change notification settings - Fork 385
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
Remove dependency of GOPATH #323
Comments
Yes, bit of an elephant in the room this one. My initial thoughts and questions, for discussion.
I'm sure there is more, but these were my initial thoughts. |
I've intentionally held off on this one as the Go team has gone through a number of iterations on modules and how There are some changes that can be made to simplify the path resolution in terms of "where is the project" and "where do I need to move some files for compilation".. these decisions were made really early, to hack-in some benefits to the developer experience, but with modules being first-class, we can now assume a lot more about the environment than could be done before. I will have some time in a couple of weeks to dive in deeply on this - as I know it is super impactful to ponzu users and the longevity of the project. Thanks for opening up this issue for tracking, and for the thoughts and feedback. I'll update this thread as I make any progress. |
If I can help @nilslice please shout. You are ahead of many I suspect :) I think many think of go mod as additional, rather than something that now ultimately deprecates gopath. Although, Ponzu has some characteristics that make it more sensitive for sure. |
Ran into the exact same issue. |
👍 this is kind of a dealbreaker for me |
ponzu will not work with go (1.13.1 tested) when GOPATH is set to anything other than GOROOT. All commands execute without complaint, but content and add-ons don't show up. I propose that since GOPATH is no longer required, and in fact go projects can now be located anywhere in the filesystem, ponzu should work with relative paths.
To replicate, using a recent version of go:
cd
into some arbitrary directory and create ago.mod
file, create amain.go
hello world, and prove that go does not require projects to be in GOPATH.$GOPATH/src/repository.domain/project
. Again, probably not what a modern go user would expect.ponzu build
to build the project. The content files will be created and the build will succeed.ponzu run
to start the project, and open a browser to the admin page. The page will show, but no content will be displayed.Following the core go team's lead, it'd be great if ponzu also removed hard-coded dependencies on GOPATH and GOROOT, and used relative paths. This is beyond my knowledge of Go internals, but it will probably require ponzu to become
go.mod
aware.The text was updated successfully, but these errors were encountered: