-
Notifications
You must be signed in to change notification settings - Fork 67
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
fix vendoring with go mod vendor
#88
Conversation
A directory with a single C file in it will not be vendored by `go mod vendor`. This commits adds a workaround by putting dummy Go files which makes go mod behave correctly.
Thanks for catching this. So according to that issue its a no-no to put those C files in a sub-directory because if they change it won't trigger a rebuild. This is a bit of a dilemma because compilation time is super slow and I moved the files there to allow for two different compilation modes: static and linked. I may need to rethink my approach in light of this detail. In any case I think this is a decent solution. I need to test it still but I would also like to see comments added to the dummy.go files that explain what purpose they are serving. |
Looks good. Once I test it I'll get this merged. |
Thanks ! |
A directory with only C files will not be vendored by go mod vendor, see this issue: golang/go#26366, specifically, Russ Cox's response golang/go#26366 (comment). Because of this, when vendoring github.com/aarzilli/golua with go mod vendor, the C header files under github.com/aarzilli/golua/lua/lua are not vendored. This commits adds a workaround to this issue by adding dummy Go files which makes go mod behave correctly. This workaround was based on a similar one found here: crawshaw/sqlite#88.
A directory with only C files will not be vendored by go mod vendor, see this issue: golang/go#26366, specifically, Russ Cox's response golang/go#26366 (comment). Because of this, when vendoring github.com/aarzilli/golua with go mod vendor, the C header files under github.com/aarzilli/golua/lua/lua are not vendored. This commits adds a workaround to this issue by adding dummy Go files which makes go mod behave correctly. This workaround was based on a similar one found here: crawshaw/sqlite#88.
A directory with only C files will not be vendored by go mod vendor, see this issue: golang/go#26366, specifically, Russ Cox's response golang/go#26366 (comment). Because of this, when vendoring github.com/aarzilli/golua with go mod vendor, the C header files under github.com/aarzilli/golua/lua/lua are not vendored. This commits adds a workaround to this issue by adding dummy Go files which makes go mod behave correctly. This workaround was based on a similar one found here: crawshaw/sqlite#88.
A directory with only C files will not be vendored by go mod vendor, see this issue: golang/go#26366, specifically, Russ Cox's response golang/go#26366 (comment). Because of this, when vendoring github.com/aarzilli/golua with go mod vendor, the C header files under github.com/aarzilli/golua/lua/lua are not vendored. This commits adds a workaround to this issue by adding dummy Go files which makes go mod behave correctly. This workaround was based on a similar one found here: crawshaw/sqlite#88.
A directory with a single C file in it will not be vendored by
go mod vendor
, see this issue.This commits adds a workaround by putting dummy Go files which makes go mod behave correctly.
It's not ideal but I don't see another way (other than requiring users to manually copy the file in their vendor directory).