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 error: buildir: failed to load package goarch: could not load export data #434

Closed
wonderflow opened this issue Apr 1, 2022 · 7 comments
Labels
question Further information is requested upstream related the golangci-lint but not to the action

Comments

@wonderflow
Copy link

It caused error running golangci lint action https://github.com/oam-dev/kubevela/runs/5775307395?check_suite_focus=true

It just happened last night.

My environment:

Run golangci/golangci-lint-action@v2
  with:
    version: v1.3.8
    github-token: ***
    only-new-issues: false
    skip-go-installation: false
    skip-pkg-cache: false
    skip-build-cache: false
  env:
    GO_VERSION: 1.17
    GOLANGCI_VERSION: v1.38
    KIND_VERSION: v0.7.0
prepare environment

The error message:

  level=warning msg="[runner] Can't run linter unused: buildir: failed to load package goarch: could not load export data: cannot import \"internal/goarch\" (unknown iexport format version 2), export data is newer version - update tool"
  level=error msg="Running error: buildir: failed to load package goarch: could not load export data: cannot import \"internal/goarch\" (unknown iexport format version 2), export data is newer version - update tool"

Are there any solution for this?

@segsalerty2013
Copy link

Similar issue here. Anyone has solution to this?

@mrwormhole
Copy link

mrwormhole commented Apr 1, 2022

I have solved this issue, you gotta add skip installation set to true, they messed up all the pipelines with making installation implicit.

There are 2 ways to solve this, you either go for v1.45.2 or above (which probably you can not if you are in a long term project and backward compatibility matters right)

or you can just add "skip-go-installation: true" under your yaml like this

  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - name: Install Go 1.16
        uses: actions/setup-go@v2
        with:
          go-version: 1.16

      - name: Checkout code
        uses: actions/checkout@v2

      - name: golangci-lint
        uses: golangci/golangci-lint-action@v2
        with:
          version: v1.38.0
          skip-go-installation: true

#435

Note: It is resolved in an easier & better way; just change "golangci/golangci-lint-action@v2" to "golangci/golangci-lint-action@v3"

@SVilgelm
Copy link
Member

SVilgelm commented Apr 1, 2022

please upgrade to v3 action, we removed the installation of go step at all

@mrwormhole
Copy link

@SVilgelm thanks!

@jessesuen
Copy link

We're hitting this as well. Had to keep setup-go at 1.17 in order get this to work (despite having the build of our actual binaries in go 1.18 in another job).

jobs:
  lint-go:
    name: Lint Go code
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3
      - uses: actions/setup-go@v3
        with:
          go-version: '1.17.8'
      - name: Run golangci-lint
        uses: golangci/golangci-lint-action@v3
        with:
          version: v1.38.0

phillbaker added a commit to phillbaker/terraform-provider-elasticsearch that referenced this issue Apr 2, 2022
phillbaker added a commit to phillbaker/terraform-provider-elasticsearch that referenced this issue Apr 3, 2022
@SVilgelm
Copy link
Member

SVilgelm commented Apr 4, 2022

We're hitting this as well. Had to keep setup-go at 1.17 in order get this to work (despite having the build of our actual binaries in go 1.18 in another job).

the linter does not support go v1.18 yet

@wonderflow
Copy link
Author

It works by upgrading to the following configuration:

https://github.com/oam-dev/kubevela/pull/3571/files

Thanks, closing...

turkenh added a commit to turkenh/provider-gcp that referenced this issue Apr 8, 2022
github-actions bot pushed a commit to crossplane-contrib/provider-gcp that referenced this issue Apr 8, 2022
golangci/golangci-lint-action#434

Signed-off-by: Hasan Turken <[email protected]>
(cherry picked from commit 2e49ed1)
Templum added a commit to Templum/rabbitmq-connector that referenced this issue May 4, 2022
Templum added a commit to Templum/rabbitmq-connector that referenced this issue May 4, 2022
* ⬆️ Updated Go Version 1.15 => 1.18

* ⬆️ Updating golangci
golangci/golangci-lint-action#434

* 🔧 Updated Devcontainer for 1.18
inigohu added a commit to inigohu/sdk-go that referenced this issue Jun 24, 2022
Error message:
```
level=error msg="Running error: buildir: failed to load package goarch: could not load export data: cannot import \"internal/goarch\" (unknown iexport format version 2), export data is newer version - update tool"
```

Upgrade `golangci-lint-action` to v3 golangci/golangci-lint-action#434

Signed-off-by: Iñigo Horcajo <[email protected]>
n3wscott pushed a commit to cloudevents/sdk-go that referenced this issue Jun 30, 2022
Error message:
```
level=error msg="Running error: buildir: failed to load package goarch: could not load export data: cannot import \"internal/goarch\" (unknown iexport format version 2), export data is newer version - update tool"
```

Upgrade `golangci-lint-action` to v3 golangci/golangci-lint-action#434

Signed-off-by: Iñigo Horcajo <[email protected]>
aloisklink added a commit to aloisklink/trezord-go that referenced this issue Aug 18, 2022
aloisklink added a commit to aloisklink/trezord-go that referenced this issue Aug 18, 2022
The golangci-lint job is failing on GitLab CI,
see https://gitlab.com/satoshilabs/trezor/trezord-go/-/commit/ec928e6456bfa60c9a298ae78613f723db256900/pipelines?ref=master

This is because only v1.45.0 of golangci-lint supports golang v1.18.0,
see golangci/golangci-lint-action#434 (comment)

Updating the `golangci-lint` action causes a bunch of warnings and
errors, so it's probably easier to just keep the golang version at
`v1.17`.
prusnak pushed a commit to trezor/trezord-go that referenced this issue Aug 19, 2022
The golangci-lint job is failing on GitLab CI,
see https://gitlab.com/satoshilabs/trezor/trezord-go/-/commit/ec928e6456bfa60c9a298ae78613f723db256900/pipelines?ref=master

This is because only v1.45.0 of golangci-lint supports golang v1.18.0,
see golangci/golangci-lint-action#434 (comment)

Updating the `golangci-lint` action causes a bunch of warnings and
errors, so it's probably easier to just keep the golang version at
`v1.17`.
bradkwadsworth-mw pushed a commit to MavenWave-DevOps/provider-gcp that referenced this issue Sep 19, 2022
bradkwadsworth-mw pushed a commit to MavenWave-DevOps/provider-gcp that referenced this issue Sep 19, 2022
phillbaker added a commit to phillbaker/terraform-provider-elasticsearch that referenced this issue Nov 25, 2022
@ldez ldez added question Further information is requested upstream related the golangci-lint but not to the action labels Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested upstream related the golangci-lint but not to the action
Projects
None yet
Development

No branches or pull requests

6 participants