x/mobile: clean up broken packages (?) #12212
Comments
What is your environment? When I |
@adg |
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. |
@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 |
CL https://golang.org/cl/12970 mentions this issue. |
CL https://golang.org/cl/13745 mentions this issue. |
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>
@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.
The text was updated successfully, but these errors were encountered: