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

Add uninstall script #75

Open
c1tt1 opened this issue Dec 15, 2017 · 6 comments
Open

Add uninstall script #75

c1tt1 opened this issue Dec 15, 2017 · 6 comments

Comments

@c1tt1
Copy link

c1tt1 commented Dec 15, 2017

It would be good to an uninstall script.

As the install script is generated, I am assuming the uninstall could also be generated, if not I could submit PR.

Thanks

@shaban
Copy link

shaban commented Dec 15, 2017

From what i understand in the near future joy will simply reside in the GOPATH along with its dependencies.

So you can delete it from there like any other go program / package.

@c1tt1
Copy link
Author

c1tt1 commented Dec 16, 2017

The script says it installs itself here: /usr/local/bin/joy
And by the way do you mean GOROOT?

@shaban
Copy link

shaban commented Dec 16, 2017

yes what you say is true thats the place where it gets installed when you use the install script.

when you install it like this (which is the default go way):

go get github.com/matthewmueller/joy/cmd/joy

It gets installed into the GOPATH which is the place where go packages are installed

GOPATH/src for sourcecode
GOPATH/pkg for libraries
GOPATH/bin for executables likes for example the joy compiler

GOROOT is where the language go itself is installed

If you didn't define a GOPATH yourselves from go 1.8 on it is being set to the $HOME/go on UNIX systems and %USERPROFILE%/go on windows.

@c1tt1
Copy link
Author

c1tt1 commented Dec 16, 2017

thanks closing

@c1tt1 c1tt1 closed this as completed Dec 16, 2017
@matthewmueller
Copy link
Owner

matthewmueller commented Dec 16, 2017

Will reopen because there will need to be some state elsewhere. I've tried just keeping all the state inside $GOPATH/src/matthewmueller/joy, but it messes with trying to go get on top of the existing files.

I agree with this and will accept a PR to make this easier. Let me just finalize the location of this extra state before this work gets started.

I've been toying with either having this extra state in $GOPATH/src/matthewmueller/.joy, though right now it's where your OS stores it's preferences. I think I've fixed the bugs around loading outside of $GOPATH, so I think either spot will be fine. It's safe to delete this folder as it will be regenerated the next time you run joy.

More information here:

func getPath(paths ...string) (p string, err error) {

For clarity there will be two things that need to be uninstalled:

  • $GOPATH/src/matthewmueller/joy
  • whichever folder this final state ends up.

@shaban
Copy link

shaban commented Dec 17, 2017

i read up a bit about go tools that allow for vendoring 3rd party stuff.

i came across https://github.com/Masterminds/glide which is up to the task.

The official dependency management tool https://github.com/golang/dep is not up to the task yet since it cannot handle non go dependencies that don't have go source files.

But they are actively working on that feature.

See golang/dep#1306

This issue thread is particularly interesting since at the start of the thread you see an example of a glide YAML configuration file for vendoring external depencencies.
In their case arbitrary binaries (compiled protocol buffers).

This is also related to issue #72

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

No branches or pull requests

3 participants