Skip to content

Comments

feat: optimize install Route and Http#1212

Merged
hwbrzzl merged 3 commits intomasterfrom
bowen/optimize-install-http
Oct 1, 2025
Merged

feat: optimize install Route and Http#1212
hwbrzzl merged 3 commits intomasterfrom
bowen/optimize-install-http

Conversation

@hwbrzzl
Copy link
Contributor

@hwbrzzl hwbrzzl commented Sep 30, 2025

📑 Description

Relate goravel/goravel#612

When installing Route:

  1. Support installing http drivers.
image
  1. Create app/http/kernel.go, routes/web.go files.
  2. Add facades.Route().GlobalMiddleware(http.Kernel{}.Middleware()...) and routes.Web() in app/providers/app_service_provder.go::Boot.
image

✅ Checks

  • Added test cases for my code

@codecov
Copy link

codecov bot commented Sep 30, 2025

Codecov Report

❌ Patch coverage is 25.13661% with 137 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.36%. Comparing base (e98cc2d) to head (c095461).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
http/setup/setup.go 0.00% 42 Missing ⚠️
route/setup/setup.go 0.00% 36 Missing ⚠️
http/setup/stubs.go 0.00% 21 Missing ⚠️
grpc/setup/setup.go 0.00% 14 Missing ⚠️
route/route.go 0.00% 14 Missing ⚠️
route/setup/stubs.go 0.00% 7 Missing ⚠️
foundation/console/package_install_command.go 92.10% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1212      +/-   ##
==========================================
- Coverage   67.75%   67.36%   -0.39%     
==========================================
  Files         236      236              
  Lines       15486    15632     +146     
==========================================
+ Hits        10493    10531      +38     
- Misses       4628     4735     +107     
- Partials      365      366       +1     

☔ 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.

@hwbrzzl hwbrzzl marked this pull request as ready for review October 1, 2025 08:03
@hwbrzzl hwbrzzl requested a review from a team as a code owner October 1, 2025 08:03
Copilot AI review requested due to automatic review settings October 1, 2025 08:03
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 PR optimizes the installation process for the Route and HTTP modules by adding driver installation support and improving the setup workflow. The changes enable automatic installation of HTTP drivers when installing the Route facade and create necessary configuration files and middleware structure.

  • Added driver installation support for facades that require drivers (Route with Gin/Fiber)
  • Enhanced HTTP installation to create kernel.go file and improve code organization
  • Improved configuration handling to support key updates rather than just additions

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
route/setup/stubs.go Added Routes stub for generating routes/web.go file
route/setup/setup.go Enhanced Route installation to create files and register middleware in AppServiceProvider
route/route.go Added fallback handling when HTTP driver not configured and empty GlobalMiddleware method
packages/modify/actions_test.go Fixed test assertion for config modification behavior
packages/modify/actions.go Modified AddConfig to update existing keys instead of warning about duplicates
http/setup/stubs.go Reorganized stubs and added Kernel stub for app/http/kernel.go
http/setup/setup.go Improved variable organization and added kernel.go creation
grpc/setup/setup.go Added clarifying comments for installation steps
foundation/console/package_install_command_test.go Added comprehensive tests for driver installation functionality
foundation/console/package_install_command.go Added installDriver method to handle driver selection and installation
contracts/binding/binding.go Added Drivers field to binding.Info and defined Route drivers

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@hwbrzzl hwbrzzl merged commit b9ee98e into master Oct 1, 2025
12 of 14 checks passed
@hwbrzzl hwbrzzl deleted the bowen/optimize-install-http branch October 1, 2025 08:34
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.

1 participant