-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
cmd/go: go build executes unnecessary mkdir #6583
Labels
Milestone
Comments
Seems to happen for any nested package such as crypto/hmac or encoding/binary. Curious: if you go one level deeper, say encoding/binary/foo, it mkdirs only two, not three mkdir -p $WORK/encoding/binary/foo/_obj/ mkdir -p $WORK/encoding/binary/ A quick scan of the source doesn't make the reason obvious. It's also very unimportant. Labels changed: added priority-later, removed priority-triage. Status changed to Accepted. |
Comment 2 by frederic.husson@baleinoid.fr: In build.go you have a makedir for the objdir and one for the target and you have in modeBuild if not a.link : a.target = a.objpkg // Make build directory. obj := a.objdir if err := b.mkdir(obj); err != nil { return err } // make target directory dir, _ := filepath.Split(a.target) if dir != "" { if err := b.mkdir(dir); err != nil { return err } } |
This doesn't matter; fixing it would make the code more fragile. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: