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

Make mockery fail with explicit error messages when using unsupported config #685

Closed
LandonTClipp opened this issue Aug 4, 2023 · 0 comments · Fixed by #686
Closed

Make mockery fail with explicit error messages when using unsupported config #685

LandonTClipp opened this issue Aug 4, 2023 · 0 comments · Fixed by #686

Comments

@LandonTClipp
Copy link
Contributor

A number of issues have been posted where users are incorrectly specifying unsupported config options in packages.

Make mockery explicitly check for these unsupported parameters and make it fail hard and fast if these are used. Users are getting confused and going down meaningless rabbit holes. This will help folks migrate to packages.

LandonTClipp added a commit to LandonTClipp/mockery that referenced this issue Aug 4, 2023
This commit will log an error message if unsupported config is being used.
I have chosen not to cause mockery to return an error code because it's possible
that configs using unsupported parameters are working just fine, so we don't
want to break those users. Instead, the log message should hopefully get their
attention, and the attention of anyone trying to migrate to packages.

This fixes vektra#685
LandonTClipp added a commit to LandonTClipp/mockery that referenced this issue Aug 4, 2023
This commit will log an error message if unsupported config is being used. I have chosen not to cause mockery to return an error code because it's possible that configs using unsupported parameters are working just fine, so we don't want to break those users. Instead, the log message should hopefully get their attention, and the attention of anyone trying to migrate to packages. Also removed is the conditional used to enter into the `packages` code path. Previously it asserted that `Config.Name == ""` but this was causing more confusion than it needed to.

This fixes vektra#685
LandonTClipp added a commit to LandonTClipp/mockery that referenced this issue Aug 4, 2023
This commit will log an error message if unsupported config is being used. I have chosen not to cause mockery to return an error code because it's possible that configs using unsupported parameters are working just fine, so we don't want to break those users. Instead, the log message should hopefully get their attention, and the attention of anyone trying to migrate to packages. Also removed is the conditional used to enter into the `packages` code path. Previously it asserted that `Config.Name == ""` but this was causing more confusion than it needed to.

This fixes vektra#685
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.

1 participant