Skip to content
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

Use vfsgen instead of go-bindata #7080

Merged
merged 6 commits into from
Jun 2, 2019
Merged

Conversation

lunny
Copy link
Member

@lunny lunny commented May 29, 2019

The embed package github.com/shurcooL/vfsgen has been vendored and will be invoke on go generate ./modules/.... So gitea build process will not be broken even the embed package API changed or not maintained. This should fix #4250.

@lafriks @tboerger maybe you can give some ideas.

@lafriks Just noticed your comment at #4250 (comment) .

@lunny lunny added the topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile label May 29, 2019
@tboerger
Copy link
Member

I personally use gorunpkg to execute scripts from modules instead of adding this kind of run wrapper :)

@lunny
Copy link
Member Author

lunny commented May 30, 2019

Script will be only invoked on mac/linux, but a go wrapper will be called much platforms.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 30, 2019
@codecov-io
Copy link

codecov-io commented May 31, 2019

Codecov Report

Merging #7080 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7080      +/-   ##
==========================================
- Coverage   41.54%   41.53%   -0.01%     
==========================================
  Files         446      446              
  Lines       60825    60825              
==========================================
- Hits        25267    25261       -6     
- Misses      32273    32280       +7     
+ Partials     3285     3284       -1
Impacted Files Coverage Δ
modules/options/options.go 96.15% <ø> (ø) ⬆️
modules/public/public.go 74.41% <ø> (ø) ⬆️
models/unit.go 62.16% <0%> (-5.41%) ⬇️
routers/repo/view.go 42.02% <0%> (-1.02%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8eba27c...89e1e29. Read the comment docs.

@lunny lunny changed the title WIP: Use vfsgen instead of go-bindata Use vfsgen instead of go-bindata May 31, 2019
@lunny
Copy link
Member Author

lunny commented May 31, 2019

It's ready to review.

@lunny lunny added this to the 1.9.0 milestone May 31, 2019
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 2, 2019
@lunny
Copy link
Member Author

lunny commented Jun 2, 2019

I noticed that this PR will increase gitea start memory from 64MB to 81MB on macOS. Should I enable some compress?

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 2, 2019
@zeripath
Copy link
Contributor

zeripath commented Jun 2, 2019

@lunny if you think it will help - sometimes compression can actually even speed things up!

@lunny
Copy link
Member Author

lunny commented Jun 2, 2019

@zeripath yes, for public resouces(except images), we could directly provide compressed bytes to browser. Currently vsfgen will always save compressed bytes on memory with a map. So for a HTTP request, it will be decompress and compress. This will waste some CPUs. I will send another PR to resolve that.

@lafriks lafriks merged commit 83b90e4 into go-gitea:master Jun 2, 2019
@lunny lunny deleted the lunny/vfsgen branch June 3, 2019 01:20
jeffliu27 pushed a commit to jeffliu27/gitea that referenced this pull request Jul 18, 2019
* use vfsgen instead of go-bindata

* fix templates

* fix fmt

* vendor vsfgen
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

go-bindata is no longer maintained
6 participants