-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Move macaron to chi #14293
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
Move macaron to chi #14293
Conversation
8ecdfb9 to
07ce068
Compare
426ec54 to
673b3d4
Compare
253c02a to
e72c4c2
Compare
Codecov Report
@@ Coverage Diff @@
## master #14293 +/- ##
==========================================
+ Coverage 41.74% 42.05% +0.30%
==========================================
Files 751 758 +7
Lines 80193 81014 +821
==========================================
+ Hits 33479 34068 +589
- Misses 41183 41391 +208
- Partials 5531 5555 +24
Continue to review full report at Codecov.
|
…the middleware could be recover
|
@6543 @a1012112796 All done. |
|
I think we should refactor some things and have a second look at all the context things - but this pull is big enough ... and works fine :) |
|
. |
* master: [skip ci] Updated translations via Crowdin Fix bug because of duplicated join (go-gitea#14454) Cron job to cleanup hook_task table (go-gitea#13080) Fix panic 500 page rendering (go-gitea#14474) [skip ci] Updated translations via Crowdin Move macaron to chi (go-gitea#14293) [skip ci] Updated translations via Crowdin Fix incorrect key name so registerManualConfirm setting works as expected. (go-gitea#14455)
* master: [skip ci] Updated translations via Crowdin Fix bug because of duplicated join (go-gitea#14454) Cron job to cleanup hook_task table (go-gitea#13080) Fix panic 500 page rendering (go-gitea#14474) [skip ci] Updated translations via Crowdin Move macaron to chi (go-gitea#14293) [skip ci] Updated translations via Crowdin Fix incorrect key name so registerManualConfirm setting works as expected. (go-gitea#14455)
* master: [skip ci] Updated translations via Crowdin Fix bug because of duplicated join (go-gitea#14454) Cron job to cleanup hook_task table (go-gitea#13080) Fix panic 500 page rendering (go-gitea#14474) [skip ci] Updated translations via Crowdin Move macaron to chi (go-gitea#14293)
Use chi instead of the forked macaron. Since macaron and chi have conflicts with session share, this big PR becomes a have-to thing. According my previous idea, we can replace macaron step by step but I'm wrong. :( Below is a list of big changes on this PR.
context.ResponseWriterinterface with an implementationcontext.Response.Routeto wrap chi so that the router usage is similar as before.web,api,internalandinstallso that the codes will be more clear and no magic .nodbsupport since it will not be maintained. BREAKcode.gitea.io/gitea/modules/translationcode.gitea.io/gitea/modules/authtocode.gitea.io/gitea/modules/formsto avoid dependency cycle.web.GetForm(ctx)in the route function but not as a function parameter on routes definition./api/v1/swaggernow will be redirect to/api/swaggerbut not render directly so thatAPIContextwill not create a html render.Notices:
TestUserHeatmapmaybe mysql version related. It's failed on my macOS(mysql 5.7.29 installed via brew) but succeed on CI.UPDATE: 2021.01.27
HOST,PORTandMACARON_ENVhas been removed. BREAK