-
Notifications
You must be signed in to change notification settings - Fork 414
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
Error when running against mod with vendoring enabled #689
Comments
Can you provide the contents of your config file? |
Below is the redacted config
Basically just copied from the docs and slightly tweaked |
We don't have an established pattern for vendored deps. I really want to fix this for you but I don't have an answer at the moment. If someone could chime in with what worked for them, I can get it added to the docs and/or make the relevant code changes we need. |
@LandonTClipp I did some more digging into it and discovered it's actually a misleading error message. The issue is that the package I had listed in the When I adjusted the I'm not sure exactly how I would adjust this, maybe display an additional message with the errors indicating that no files were found for the specified package. But for any future spelunkers, if you get either of these error messages
or
check all your package paths to make sure they have go files |
Just an exclude parameter should fix this I think. Although excluding the vendor dir by default also makes sense. Are you sure your error wasn't caused by a combination of those two problems? @bzumhagen |
It could be a combination for sure, I didn't try to suss out exactly what lead to it. |
PLEASE READ
DO NOT submit tickets without first using the latest version of Golang, clearing your local golang package cache, and re-building mockery using the latest Golang version and the latest version of mockery. Please provide evidence this has been done in your issue. Failure to provide this evidence will likely result in your issue being closed.
Description
When trying to run mockery against a golang mod project with vendoring enabled, I get an error.
Mockery Version
v2.23.4
Golang Version
Whatever version is in the docker image vektra/mockery:v2.23
Installation Method
Steps to Reproduce
Expected Behavior
I expect mockery to run successfully
Actual Behavior
[what actually happened]
The text was updated successfully, but these errors were encountered: