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

placing non-go files in subdirs prevents go mod vendor from working correctly #64

Open
codyps opened this issue Nov 18, 2024 · 1 comment

Comments

@codyps
Copy link

codyps commented Nov 18, 2024

See golang/go#26366 for some backstory here.

Essentially, go (and especially go mod vendor) doesn't like having subdirectories that aren't go packages that are depended on. Currently, this package tracks include/header files and binary library objects in subdirectories. As a result, any package that depends on bls-eth-go-binary (at any distance) will be broken when used with go mod vendor, because go mod vendor will not keep the header & library files because it doesn't consider them to be members of the module being depended on.

Potential fixes:

  • create an empty.go file in each subdirectory and depend on them so go sees the subdirectories as modules that need to be downloaded
  • flatten the subdirectories and include all files in an existing go module directory. ie: name files bls/lib-linux-arm64-libbls384_256.a, etc. (as bls is the directory of the go module that links these libraries).
@herumi
Copy link
Owner

herumi commented Nov 19, 2024

If I place an empty.go file in each directory, can I keep the original file names?
Since this project is sometimes used by non-Go projects, I'd like to minimize changes to file names and directory structure as much as possible.

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