What to do about go fmt 1.4 ?
John Meinel
john at arbash-meinel.com
Tue Mar 10 13:04:03 UTC 2015
On Tue, Mar 10, 2015 at 4:52 PM, John Meinel <john at arbash-meinel.com> wrote:
> So there are 2 changes that I encountered with upgrading go to 1.4.2:
>
> 1) They changed how they sort import paths. Currently all our imports are:
>
> "github.com/juju/juju/bar"
> coretesting "github.com/juju/juju/testing"
> (sorted by the import string)
>
> It wants to sort them as:
>
> coretesting "github.com/juju/juju/testing"
> "github.com/juju/juju/bar"
>
> (sorted by the local name)
>
>
I could be wrong about this one, I was frustrated by (2) and thought the
diff was a change in behavior. It was probably just something I committed
without running go fmt before.
John
=:->
>
> 2) It no longer works if you have a symlink in your PWD
> Because of the need for exact paths, I have a link from $HOME/jc =>
> $HOME/dev/go/src/github.com/juju/juju
> However, if I do "go fmt" it now complains that:
> stat ../../../dev/go/src/github.com/juju/juju/worker/uniter/deployer.go:
> no such file or directory
>
> (it seems to be using pwd -P and then using relative paths to that)
>
> Anyone know why it would need to do that?
>
> I can work around it with "cd jc; cd `pwd -P`" or some other form so I
> don't have to type the long form each time.
>
>
>
> Does anyone using go 1.4 have some tricks to work around these problems?
>
> John
> =:->
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20150310/4b2962e6/attachment.html>
More information about the Juju-dev
mailing list