You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As guide says, I've migrated to using top-level .mockery.yaml file with packages map, but I'm still seeing these logs
14 Jan 25 12:31 MSK WRN DEPRECATION: use of the packages config will be the only way to generate mocks in v3. Please migrate your config to use the packages feature. deprecation-name=packages
migration=https://vektra.github.io/mockery/v2.51/migrating_to_packages/ url=https://vektra.github.io/mockery/v2.51/features/#packages-configuration version=v2.51.0
The mocks are generated as expected
Mockery Version
v2.51.0
Go Version
go version go1.23.4 darwin/arm64
Installation Method
Binary Distribution
Docker
brew
go install
Other: [specify]
Steps to Reproduce
I had to cover some stuff since it's a private repo, but can try to provide a minimal reproducible example later.
repo is using gitlab.company.com/project/repo-name pattern
$ mockery from root of the project
Expected Behavior
Mocks are being created without any error messages
Actual Behavior
14 Jan 25 12:13 MSK INF Starting mockery dry-run=false version=v2.51.0
14 Jan 25 12:13 MSK INF Using config: <repo>/.mockery.yaml dry-run=false version=v2.51.0
14 Jan 25 12:13 MSK INF done loading, visiting interface nodes dry-run=false version=v2.51.0
14 Jan 25 12:13 MSK INF generating mocks for interface dry-run=false interface=<interfaceName> qualified-name=<repo>/internal/handlers/<package> version=v2.51.0
14 Jan 25 12:13 MSK INF writing to file dry-run=false file=mocks/<repo>/internal/handlers/<package>/mock_<interfaceName>.go interface=
<interfaceName> qualified-name=<repo>/internal/handlers/<package> version=v2.51.0
14 Jan 25 12:13 MSK WRN DEPRECATION: use of the packages config will be the only way to generate mocks in v3. Please migrate your config to use the packages feature. deprecation-name=packages
migration=https://vektra.github.io/mockery/v2.51/migrating_to_packages/ url=https://vektra.github.io/mockery/v2.51/features/#packages-configuration version=v2.51.0
After playing with different options for a while, it seems like missing config map under package cause this, because this config works fine and doesn't produce any errors
# opts from previous examplepackages:
<repo>/internal/handlers/<package>:
config:
recursive: Trueinterfaces:
<interfaceName>:
but having config: as an empty map crashes mockery
# opts from previous examplepackages:
<repo>/internal/handlers/<package>:
config:
interfaces:
<interfaceName>:
I have no need in changing any config options so I don't want to pass it explicitly. I also haven't found anything in the docs mentioning mandatory config map, so seems like a bug to me.
The text was updated successfully, but these errors were encountered:
This was just a weird edge case in my shitty config logic (which was totally redone in v3 btw, so don't hate me 😄 ). I submitted a PR that fixes this. Thanks for the report!
Description
As guide says, I've migrated to using top-level
.mockery.yaml
file withpackages
map, but I'm still seeing these logsThe mocks are generated as expected
Mockery Version
v2.51.0
Go Version
go version go1.23.4 darwin/arm64
Installation Method
Steps to Reproduce
I had to cover some stuff since it's a private repo, but can try to provide a minimal reproducible example later.
.mockery.yaml
at the root of the projectrepo
is usinggitlab.company.com/project/repo-name
pattern$ mockery
from root of the projectExpected Behavior
Mocks are being created without any error messages
Actual Behavior
After playing with different options for a while, it seems like missing
config
map under package cause this, because this config works fine and doesn't produce any errorsbut having
config:
as an empty map crashesmockery
trace
I have no need in changing any
config
options so I don't want to pass it explicitly. I also haven't found anything in the docs mentioning mandatoryconfig
map, so seems like a bug to me.The text was updated successfully, but these errors were encountered: