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: document that a .go file is required even if there is a .swig file #11875

Open
chai2010 opened this Issue Jul 27, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@chai2010
Contributor

chai2010 commented Jul 27, 2015

go version devel +aad4fe4 Thu Jul 23 05:50:53 2015 +0000 windows/amd64

Only include example.swig and simple.c:

go build
can't load package: package mydev/swig/simple: no buildable Go source files in C:\go\gopkg\src\mydev\swig\simple

If i create a x.go like this:

package example

go build is ok.

@ianlancetaylor

This comment has been minimized.

Contributor

ianlancetaylor commented Jul 27, 2015

This seems unavoidable: without a .go file, the go tool does not know the name of the package. Furthermore, it seems desirable: you should have a .go file that documents that package, as godoc does not know how to extract documentation from a .swig file.

I'll leave this open to update the documentation.

@ianlancetaylor ianlancetaylor changed the title from swig: can't load package to cmd/go: document that a .go file is required even if there is a .swig file Jul 27, 2015

@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Jul 27, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment