-
Notifications
You must be signed in to change notification settings - Fork 109
feat: [#538] track mockery tool dependencies in go.mod #902
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
Conversation
|
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #902 +/- ##
==========================================
- Coverage 67.83% 67.78% -0.05%
==========================================
Files 154 154
Lines 10194 10194
==========================================
- Hits 6915 6910 -5
- Misses 2943 2951 +8
+ Partials 336 333 -3 ☔ View full report in Codecov by Sentry. |
|
I believe this is only necessary for framework developers; adding more dependencies for framework users is unnecessary. Simply adding an instruction about mockery in the contribution guide will also work. |
I mentioned, “Mockery is distinguished by a //go:build tools build tag, so its dependencies are not included in the normal build or packaging process.” |
|
Contributing code to the framework has become more common, so managing the versions of development tools is essential. First, it prevents developers from needing to install additional tools on their own machines. Second, the Mockery tool updates frequently and often requires adjustments to the production code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, could you update the action file to use the new command? And what's the command in Golang v1.24? Could you update it in the description? We can remove the dependency after Golang v1.23 is not maintained. And please create another PR to update the Goravel document.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.
| Benchmark suite | Current: af4d90c | Previous: 3cde68c | Ratio |
|---|---|---|---|
Benchmark_EncryptString |
5890 ns/op 2160 B/op 15 allocs/op |
2225 ns/op 2160 B/op 15 allocs/op |
2.65 |
Benchmark_EncryptString - ns/op |
5890 ns/op |
2225 ns/op |
2.65 |
Benchmark_DecryptString |
5954 ns/op 2040 B/op 17 allocs/op |
2045 ns/op 2040 B/op 17 allocs/op |
2.91 |
Benchmark_DecryptString - ns/op |
5954 ns/op |
2045 ns/op |
2.91 |
This comment was automatically generated by workflow using github-action-benchmark.
Done🔥 |
📑 Description
This update introduces the management of the Mockery tool version within the framework’s go.mod, ensuring consistency across environments. By specifying the version, we avoid discrepancies in generated code caused by version mismatches of Mockery. The command execution now uses
go run github.com/vektra/mockery/v2instead of the previousmockerycommand. This approach is applicable to Go versions prior to 1.24, as later versions include built-in tool version management.In Go 1.24 and later, you can execute the Mockery tool with the following command:
go get --tool github.com/vektra/mockery/v2@v2.52.0, and then usego tool mockeryto run Mockery.Mockery is distinguished by a
//go:build toolsbuild tag, so its dependencies are not included in the normal build or packaging process.Closes goravel/goravel#538
@coderabbitai summary
✅ Checks