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

Could not run the latest Mockery Docker image with 1.22 codebase #756

Closed
1 of 5 tasks
daweifeng opened this issue Feb 12, 2024 · 1 comment · Fixed by #757
Closed
1 of 5 tasks

Could not run the latest Mockery Docker image with 1.22 codebase #756

daweifeng opened this issue Feb 12, 2024 · 1 comment · Fixed by #757

Comments

@daweifeng
Copy link

Description

Although the Dockerfile is using golang:1.22-alpine, the go version in go.mod is still 1.21, which causing this error when running Mockery on my 1.22 codebase:

ERR encountered error when loading package error="-: This application uses version go1.21 of the source-processing packages but runs version go1.22 of 'go list'. It may fail to process source files that rely on newer language features. If so, rebuild the application using a newer version of Go." dry-run=false version=v2.40.3

Mockery Version

v2.40.3

Golang Version

1.22

Installation Method

  • Binary Distribution
  • Docker
  • brew
  • go install
  • Other: [specify]

Steps to Reproduce

  1. Create a go codebase with 1.22 and use the latest feature, like for i := range 10
  2. Run Mockery on the codebase

Expected Behavior

There shouldn't have errors like the ones above.

Actual Behavior

ERR encountered error when loading package error="-: This application uses version go1.21 of the source-processing packages but runs version go1.22 of 'go list'. It may fail to process source files that rely on newer language features. If so, rebuild the application using a newer version of Go." dry-run=false version=v2.40.3
@LandonTClipp
Copy link
Collaborator

Ah of course, I will fix it.

LandonTClipp added a commit to LandonTClipp/mockery that referenced this issue Feb 12, 2024
@LandonTClipp LandonTClipp mentioned this issue Feb 12, 2024
21 tasks
rbtcollins added a commit to rbtcollins/mockery that referenced this issue Sep 18, 2024
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 a pull request may close this issue.

2 participants