-
Notifications
You must be signed in to change notification settings - Fork 128
Goimport removes wrong import #89
Comments
@azr Just to rule out any
|
FYI, there was an issue with Atom < |
Hello there, I'm on Yosemite, but I never launch atom command line. Here are my go-plus infos :
|
I filed https://code.google.com/p/go/issues/detail?id=9087 for somebody to investigate. |
@azr Thanks - can you launch Atom from the command line to determine if there is any change in behavior? |
@joefitzgerald, no pbm, same happens if I launch it from cmd. |
Is the library installed? If it's not, goimports has no way of knowing that |
In any case, I cannot repro this issue using your test file (after installing the biogo.matrix library) and |
Hey @cespare I dont know if I said it right, but from the command line if you look at the diff up there, the import is not removed, the spacing is just fixed. |
@azr, I'm not sure I agree with your assertion, but I'm willing to suspend disbelief for a moment to further investigate. Do you have time to do a screen sharing session so I can debug this with you interactively? If so, please follow @joefitzgerald on Twitter so that we can direct message. |
Sent you those DM's - they're a little hidden in Twitter's UX; you'll have to click on the 'Messages' button. |
I got an email from "Chance Zibolski" with a comment that is no longer visible here - perhaps it was deleted?
|
Turns out I was testing on the wrong file, and it was working fine actually. |
@ecnahc515 I wonder if there's a nugget of wisdom in your findings though... Can you describe more about the scenario (the "wrong file") and why it was wrong? |
After a screensharing session with @azr, I can confirm the issue is with go-plus. When a user launches Atom from Finder / Dock / Spotlight, the environment comes from launchd, and so most people do not have things like GOPATH set.
|
Glad I could help :) |
@azr can you please update |
Hey @joefitzgerald the lib is no longer removed ! Yay. It still leaves a gap between the imports : import (
"errors"
"image"
"image/color"
"math"
"code.google.com/p/biogo.matrix"
"code.google.com/p/graphics-go/graphics"
"github.com/azr/phash/floats"
"github.com/azr/phash/manipulator"
"github.com/nfnt/resize"
) But it seems it's done on purpose ? To separate official libs from others ? |
Yes, that's done on purpose by |
Ok, cool. No problem :) |
Hello there,
in this file, the import line
"code.google.com/p/biogo.matrix"
gets removed by goimports using go-plus.If I edit it with vim with wrong spacing I get :
If I do
it's not removed.
Cheers !
Edit: It's not removed if I use gofmt as a format tool.
The text was updated successfully, but these errors were encountered: