ascarter / Go-bbpackage

BBEdit package for Go development
MIT License
35 stars 3 forks source link

Bundle Go dependencies #3

Open ascarter opened 8 years ago

ascarter commented 8 years ago

When building the Go.bbpackage bundle, should build go tools like gotags into the bundle so that it is not fragile when running the helper scripts.

Steps;

Downside of this would be that it can't take advantage of any existing tools. Alternative could be to pre-flight when building and inform the user.

Another option - support a default go workspace (like ~/.go) and add it to the GOPATH if it is found. This would let the user either install there or override the built-in tools

carltongibson commented 8 years ago

I think for this bundle just having an explicit README is enough. (Who uses Go and BBEdit and can't follow a four step install/upgrade guide?)

ascarter commented 8 years ago

That's fair - but the particular problem I want to solve is that the GOPATH is not seen in BBEdit shell scripts. This means that any tools like gotags need to be in the workspace for your project. That may or may not be a problem. I know I work with a default workspace ~/.go where I put stuff like gotags so I don't have to install to each workspace.

Alternately, I could require that stuff like gotags get installed in a path that is there like /usr/local/bin.

carltongibson commented 8 years ago

Hmmm. Vague memories of configuring an XML file come to mind...

The manual now says this though:

Setting Environment Variables for GUI Apps

BBEdit now reads your account’s command line environment directly; thus, you need not employ any special mechanisms to pass environment settings to it.

i.e. I'm curious why this isn't Just Working™

ascarter commented 8 years ago

I am as well. I'll debug it - would be perfect if it does indeed read the shell environment - can leave that all up to the user to configure as they see fit.

I'll try it on a couple different machines and see if I can unroll how it works.