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

"ignore" build tag is special in module mode #83

Open
segevfiner opened this issue Jul 22, 2020 · 1 comment
Open

"ignore" build tag is special in module mode #83

segevfiner opened this issue Jul 22, 2020 · 1 comment

Comments

@segevfiner
Copy link

See golang/go#29598

The README shows using an "assets_generate.go" with the "ignore" build tag, but that is ignored for the purposes of modules which will make it not pin the version of vfsgen if there isn't another file importing it.

Unrelated to this I had trouble getting this to work with modules, the importPathToDir trick doesn't seem to work in modules mode. So I had to move the go:generate comment to the main module and use the Filename options to vfsgen to get it to write the file to the right place. This package could really use better/updated docs.

@dmitshur
Copy link
Member

Thanks for reporting the problem with ignore build tag, that indeed needs to be fixed.

Can you please open a separate issue about the problem with importPathToDir? It does need to be run inside the main module, but otherwise should work. It’ll be easier to discuss it in more detail in a dedicated issue. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants