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

internal/build: ignore some files in FindMainPackages #27521

Merged
merged 1 commit into from Jun 20, 2023

Conversation

jsvisa
Copy link
Contributor

@jsvisa jsvisa commented Jun 20, 2023

In macOS, there may exist hidden .DS_Store files inside some directories. These are filesystem metadata files created by Finder.
If one of these .DS_Store files is inside the ./cmd directory, then running make test will fail with an error:

$ make test
env GO111MODULE=on go run build/ci.go install  
util.go:202: fdopendir cmd/.DS_Store: not a directory  
exit status 1
make: *** [all] Error 1

This happens because the Go build tools try to process all files in the ./cmd directory, including the .DS_Store file, resulting in an error.

To fix this, we can ignore any files when parsing the package directory.

Signed-off-by: jsvisa <delweng@gmail.com>
Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me

@fjl fjl changed the title internal/build: parser should ignore files internal/build: ignore some files in FindMainPackages Jun 20, 2023
@fjl fjl merged commit 84b05d4 into ethereum:master Jun 20, 2023
2 checks passed
@jsvisa jsvisa deleted the internal-build-ignore-file branch June 20, 2023 11:26
spencer-tb pushed a commit to spencer-tb/go-ethereum that referenced this pull request Jul 7, 2023
MoonShiesty pushed a commit to MoonShiesty/go-ethereum that referenced this pull request Aug 30, 2023
devopsbo3 pushed a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
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

Successfully merging this pull request may close these issues.

None yet

3 participants