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

cmd/godoc: examples don't use build constraints? #4806

Closed
bradfitz opened this issue Feb 14, 2013 · 4 comments
Closed

cmd/godoc: examples don't use build constraints? #4806

bradfitz opened this issue Feb 14, 2013 · 4 comments
Milestone

Comments

@bradfitz
Copy link
Contributor

On Linux, if I look at:

http://localhost:6060/pkg/syscall/

I get warnings:

2013/02/14 09:58:46 skipping example ExampleLoadLibrary: refers to unknown function or
type
2013/02/14 09:58:47 skipping example ExampleLoadLibrary: refers to unknown function or
type
...

The file is already named syscall_windows_test.go.  If I add a +build windows
constraint, it doesn't help.

Looking at src/cmd/godoc/parser.go, it doesn't seem that a Context is used at all, so
+build constraints aren't even honored?

There's a TODO from gri to add a ParseFile API.  On Context?

I don't know what the right fix is here.
@adg
Copy link
Contributor

adg commented Feb 15, 2013

Comment 1:

I think godoc's parseDir function should use go/build, instead of doing its own thing.
gri?

@griesemer
Copy link
Contributor

Comment 2:

The TODO in src/cmd/godoc/parser.go is unrelated (and not valid anymore), but parseDir
is not doing the right thing anymore - this is all historic code. Will look into this.

Owner changed to @griesemer.

Status changed to Started.

@griesemer
Copy link
Contributor

Comment 3:

work in progress: https://golang.org/cl/7333046

@griesemer
Copy link
Contributor

Comment 4:

This issue was closed by revision 3ee87d0.

Status changed to Fixed.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1maybe label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants