vektra / mockery

A mock code autogenerator for Go
https://vektra.github.io/mockery/
BSD 3-Clause "New" or "Revised" License
5.8k stars 395 forks source link

`disable-version-string` not respected in packages config #785

Open LandonTClipp opened 3 weeks ago

LandonTClipp commented 3 weeks ago

https://github.com/vektra/mockery/discussions/783#discussioncomment-9682934

Tochemey commented 3 weeks ago

@LandonTClipp I can take a look at this in the weekend if you don't mind. You can assign it to me.

LandonTClipp commented 3 weeks ago

That would be great! Thanks @Tochemey .

Tochemey commented 2 weeks ago

@LandonTClipp I took a look at the code and I can see the prologue is always displayed. Something that is necessary. However disabling the version number seems be odd to me because I believe having to know which version of the tool is used is really important for migration or any update or bug fixes that will be needed by the developer.

I am of the opinion we should not even allow this flag to be there at all.

Tochemey commented 2 weeks ago

@LandonTClipp what is your take on this suggestion?

LandonTClipp commented 2 weeks ago

Hi @Tochemey , I think there is a legitimate use-case for developers. Often, projects will specify the exact version of mockery to use, and they will have a Makefile that does something like go run github.com/vektra/mockery which will pull down the specific version specified in go.mod. Some projects like to regularly update mockery, but doing so without disabling the version string can result in huge PRs that do not have any real changes. Some people just don't like that.