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

Running test suite locally does not work on M1 Mac #2499

Closed
aedwardg opened this issue Sep 24, 2022 · 0 comments · Fixed by #2500
Closed

Running test suite locally does not work on M1 Mac #2499

aedwardg opened this issue Sep 24, 2022 · 0 comments · Fixed by #2500
Labels
x:status/claimed Someone is working on this issue

Comments

@aedwardg
Copy link
Contributor

Problem

After running bin/fetch-golangci-lint and bin/run-tests on an M1 Mac (or other arm64 system), contributors receive the following error:

copy exemplar exercises/practice/word-search/.meta/example.go to tmp/lint/practice/word_search
copy module exercises/practice/word-search/go.mod to tmp/lint/practice/word_search
copy generator exercises/practice/word-search/.meta/gen.go
put everything in the same module
copy base files and tests to tmp/lint/practice/wordy
copy exemplar exercises/practice/wordy/.meta/example.go to tmp/lint/practice/wordy
copy module exercises/practice/wordy/go.mod to tmp/lint/practice/wordy
copy generator exercises/practice/wordy/.meta/gen.go
put everything in the same module
copy base files and tests to tmp/lint/practice/yacht
copy exemplar exercises/practice/yacht/.meta/example.go to tmp/lint/practice/yacht
copy module exercises/practice/yacht/go.mod to tmp/lint/practice/yacht
copy generator exercises/practice/yacht/.meta/gen.go
put everything in the same module
copy base files and tests to tmp/lint/practice/zebra_puzzle
copy exemplar exercises/practice/zebra-puzzle/.meta/example.go to tmp/lint/practice/zebra_puzzle
copy module exercises/practice/zebra-puzzle/go.mod to tmp/lint/practice/zebra_puzzle
put everything in the same module
running linter and tests for exercises and exercise generators
panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt

goroutine 1 [running]:
github.com/go-critic/go-critic/checkers.init.22()
    github.com/go-critic/[email protected]/checkers/embedded_rules.go:47 +0x494
LINTER/TESTS FAILED for exercises or exercise generators
deleting tmp/lint

This is due to an interaction with golangci-lint and go-critic on older versions of golangci-lint.
See this issue for more information.

Note, this issue has been documented for arm64 systems with certain versions of Go, but doesn't seem to occur on amd64 architectures. However, it doesn't appear to be an issue for arm64 anymore since v1.49.0.

Steps to reproduce

  1. On an M1 mac or other arm64 machine, run the current bin/fetch-golangci-lint script
  2. Try running the tests with bin/run-tests
  3. See error above
@junedev junedev added the x:status/claimed Someone is working on this issue label Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:status/claimed Someone is working on this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants