Skip to content

feat: [#822] Remove unnecessary code and add missing code when installing all facades#1284

Merged
hwbrzzl merged 4 commits intomasterfrom
bowen/#822-1
Dec 7, 2025
Merged

feat: [#822] Remove unnecessary code and add missing code when installing all facades#1284
hwbrzzl merged 4 commits intomasterfrom
bowen/#822-1

Conversation

@hwbrzzl
Copy link
Contributor

@hwbrzzl hwbrzzl commented Dec 5, 2025

📑 Description

Closes goravel/goravel#822

This pull request makes several significant improvements and simplifications to the setup and modification logic for database, HTTP, and gRPC modules, as well as enhances the helper matching utilities with comprehensive documentation and new matching capabilities. The most important changes include removing the creation and management of kernel.go files from setup scripts, refactoring route registration logic for gRPC, and adding new helper methods and documentation for code matching utilities.

Setup script simplification and cleanup

  • Removed all logic related to creating, checking, and removing kernel.go files from database/setup/setup.go, http/setup/setup.go, and grpc/setup/setup.go. This streamlines the setup and uninstall processes by eliminating unnecessary file management. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Route registration and removal improvements

  • Refactored gRPC setup to use a more flexible route registration system: introduced AddRouteApply and RemoveRouteApply methods, and updated the setup logic to add/remove the Grpc function in the routing setup. This makes route management more modular and easier to maintain. [1] [2] [3] [4] [5]

Enhanced match helper utilities

  • Added thorough documentation comments to all matcher helper functions in packages/match/helper.go, explaining their purpose, usage, and examples. This greatly improves code readability and developer onboarding. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

  • Added new matcher functions for common patterns: RegisterFunc, BootFunc, Seeders, ValidationRules, and ValidationFilters, enabling more precise and automated code modifications for service providers and validation logic. [1] [2] [3]

Minor refactoring for consistency

  • Updated variable naming and import usage in setup scripts for consistency and clarity, such as using routesPath from configuration and constructing route function names dynamically.

These changes collectively make the framework's setup and code modification processes more maintainable, extensible, and developer-friendly.

✅ Checks

  • Added test cases for my code

Copilot AI review requested due to automatic review settings December 5, 2025 14:38
@hwbrzzl hwbrzzl requested a review from a team as a code owner December 5, 2025 14:38
@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 27.22222% with 131 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.61%. Comparing base (4dcf6db) to head (f170ce0).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
queue/setup/stubs.go 0.00% 45 Missing ⚠️
packages/modify/utils.go 28.00% 18 Missing ⚠️
packages/modify/modify.go 0.00% 16 Missing ⚠️
queue/setup/setup.go 0.00% 16 Missing ⚠️
grpc/setup/setup.go 0.00% 13 Missing ⚠️
route/setup/setup.go 0.00% 12 Missing ⚠️
packages/modify/with_slice_actions.go 79.24% 5 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1284      +/-   ##
==========================================
- Coverage   68.90%   68.61%   -0.30%     
==========================================
  Files         264      264              
  Lines       15515    15632     +117     
==========================================
+ Hits        10691    10726      +35     
- Misses       4363     4442      +79     
- Partials      461      464       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request removes all kernel file management logic from setup scripts across database, gRPC, HTTP, and schedule modules, simplifying the installation and uninstallation processes.

  • Eliminates creation, modification checks, and conditional deletion of kernel.go files
  • Removes associated helper functions (isKernelNotModified)
  • Cleans up unused imports and updates comments to reflect the changes

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
schedule/setup/setup.go Removed console kernel.go creation/deletion logic, isKernelNotModified helper function, and unused imports (file, stubs)
http/setup/setup.go Removed app/http/kernel.go creation and deletion, updated comments to exclude kernel file references
grpc/setup/setup.go Removed app/grpc/kernel.go creation and deletion, updated comments to exclude kernel file references
database/setup/setup.go Removed database kernel.go creation/deletion logic and isKernelNotModified helper function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hwbrzzl hwbrzzl marked this pull request as draft December 7, 2025 06:14
@hwbrzzl hwbrzzl changed the title feat: [#822] Remove unnecessary code feat: [#822] Remove unnecessary code and add missing code Dec 7, 2025
@hwbrzzl hwbrzzl changed the title feat: [#822] Remove unnecessary code and add missing code feat: [#822] Remove unnecessary code and add missing code when installing all facades Dec 7, 2025
Copy link

@github-actions github-actions bot left a 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: f170ce0 Previous: 4866257 Ratio
Benchmark_DecryptString 5478 ns/op 2032 B/op 16 allocs/op 2083 ns/op 2032 B/op 16 allocs/op 2.63
Benchmark_DecryptString - ns/op 5478 ns/op 2083 ns/op 2.63

This comment was automatically generated by workflow using github-action-benchmark.

@hwbrzzl hwbrzzl marked this pull request as ready for review December 7, 2025 08:14
@hwbrzzl hwbrzzl merged commit b1af9d0 into master Dec 7, 2025
11 of 14 checks passed
@hwbrzzl hwbrzzl deleted the bowen/#822-1 branch December 7, 2025 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean unnecessary code when installing facades

2 participants