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

x/mobile: clean up broken packages (?) #12212

Closed
ip opened this issue Aug 19, 2015 · 6 comments

Comments

Projects
None yet
5 participants
@ip
Copy link

commented Aug 19, 2015

@crawshaw
That's not a big issue, but it is somewhat dirty and inconsistent. There are warnings (or errors?) particularly when getting these packages (perhaps there are more):
golang.org/x/exp/shiny/driver/gldriver golang.org/x/mobile/...

Please don't say that this is rare case and close the issue, because it is common form. When taking an import path with ..., go get will traverse all subpackages, so directories and files that doesn't contain go code should be named with starting underscore to avoid unnecessary warnings.
Example warnings:
..\src\golang.org\x\mobile\bind\java\testpkg\testpkg.go:19:2: no buildable Go source files in C:\Users\Vanya\Documents\PROG\Go\src\golang.org\x\mobile\asset ..\src\golang.org\x\mobile\exp\gl\glutil\glutil.go:12:2: C source files not allowed when not using cgo or SWIG: work.c can't load package: ..\src\golang.org\x\mobile\exp\gl\glutil\glutil.go:12:2: C source files not allowed when not using cgo or SWIG: work.c

Solution is for package maintainers to find all such cases and rename the folders and files.

@ianlancetaylor ianlancetaylor changed the title Irrelevant warnings when using "go get" with "..." in import path cmd/go: Irrelevant warnings when using "go get" with "..." in import path Aug 20, 2015

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Aug 20, 2015

@adg adg changed the title cmd/go: Irrelevant warnings when using "go get" with "..." in import path x/mobile: clean up broken packages (?) Aug 20, 2015

@adg

This comment has been minimized.

Copy link
Contributor

commented Aug 20, 2015

What is your environment? When I go get mobile/... I see legitimate errors for actually broken packages, but not those errors.

@ip

This comment has been minimized.

Copy link
Author

commented Aug 20, 2015

@adg go version devel +fa87cf8 Wed Aug 19 04:36:55 2015 +0000 windows/amd64

@ip

This comment has been minimized.

Copy link
Author

commented Aug 20, 2015

Generally for Windows I am periodically noticing some errors, such as test failures when building Go from recent Git revision, errors in /x/... packages telling that temporary folder can't be deleted because it is not empty (I think this is because slight difference in semantic of file API between Unix and Windows) and so on.
Possibly this is more general issue regarding testing infrastructure of Go development team.

@alexbrainman

This comment has been minimized.

Copy link
Member

commented Aug 20, 2015

@ip I suspect the errors are from failed removals of temp files / directories. Windows won't allow you to remove opened files or directories that are current for any live process. Feel free to fix those. I would look in my %TEMP% directory, delete all files / directories there, then run all suspicious tests or build steps and see what is left in %TEMP%. This should give me some clues of where to look.

Alex

@gopherbot

This comment has been minimized.

Copy link

commented Aug 21, 2015

CL https://golang.org/cl/12970 mentions this issue.

@gopherbot

This comment has been minimized.

Copy link

commented Aug 21, 2015

CL https://golang.org/cl/13745 mentions this issue.

hyangah added a commit to golang/mobile that referenced this issue Aug 24, 2015

cmd/gomobile: reset readonly bits of downloaded files in Windows
os.Rename in init fails in Windows for various reasons. One of them
is the temporary files extracted from NDK, OpenAL archives. For
some reason, some of them have read-only properties.
(golang/go#12212)

> gomobile init
gomobile: rename
 C:\Users\foo\pkg\gomobile\work-427911983\openal\include\AL
 C:\Users\foo\pkg\gomobile\android-ndk-r10e\arm\sysroot\usr\include\AL:
 Access is denied.

We reset the read-only bits of all the extracted files.

Change-Id: Ib958cbedf1b7527ecb5b9318f23fe9437dc7c241
Reviewed-on: https://go-review.googlesource.com/12970
Reviewed-by: David Crawshaw <crawshaw@golang.org>

@golang golang locked and limited conversation to collaborators Aug 24, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.