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/sys/windows: godoc is useless again #16509
Comments
Unfortunately I don't have any bright ideas. I am sure it is because of CL 24952. I can revert the change. But then we need to find different solution to issue #16368. Alternatively we can hard code golang.org/sys/windows (and some others) in gddo to display these as windows packages. But this is very error prone. And what about other similar packages? Maybe we could come up with some new gddo rule for that. Compare different GOOS / GOARCH versions of the package - number of global variables, functions, types and so on - and show version with most of these. What do you think? Alex |
Maybe, until godoc can recognize build tags, we need a special build tag for godoc.
It's ugly, but is it bad? |
|
I still think making go generate recognize GOOS/GOARCH
is wrong.
go generate is different from build, so it shouldn't take build
tags into account.
|
Like this https://go-review.googlesource.com/#/c/25353 ? Alex |
CL https://golang.org/cl/25353 mentions this issue. |
Updates golang/go#16509 Change-Id: Id0dd8f1aee82a45375363e32682e85868eea4765 Reviewed-on: https://go-review.googlesource.com/25353 Reviewed-by: Chris Broadfoot <cbro@golang.org>
Underlying cause makes Windows development more difficult as both godoc & pkg.go.dev miss exported functions of some packages due to Windows build constraints. Example: I don't think it is go doc's responsibility to enforce build constraints & if anything it should say somewhere in the documentation that a function is only exported on a certain OS/ARCH if that is the case. |
https://pkg.go.dev/golang.org/x/sys/windows works quite well now (it renders for windows by default). https://pkg.go.dev/github.com/microsoft/go-winio renders for linux by default, but does have a drop-down for windows. A long discussion about this UX occurred on #37232. |
The godoc for https://godoc.org/golang.org/x/sys/windows is empty, probably because of https://go-review.googlesource.com/24952
Maybe this is a gddo problem too. (Or maybe gddo can help or have better heuristics over which build context to use)
/cc @alexbrainman @adg @broady @shantuo @alandonovan
The text was updated successfully, but these errors were encountered: