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

Consider excluding Changelog.md from gem releases (or prune it periodically) #2871

Open
myronmarston opened this issue Feb 20, 2021 · 3 comments

Comments

@myronmarston
Copy link
Member

The Changelog.md file is quite large--105 KB according to ls:

 ~/code/rspec-core/ [main] ls -al | grep Changelog.md
-rw-r--r--   1 myron  staff  104657 Feb 19 20:35 Changelog.md

According to rubygems.org, rspec-core 3.10.1 is 161 KB, meaning the Changelog is approximately 65% of the total size of the rspec-core gem.

In my experience, Ruby developers rarely look at the Changelog file within a local gem install. I don't think most ruby developers know the exact directory a gem install ... or bundle install puts gems to even go look there. I think I've only ever looked at Changelogs either on github or in a local git clone. I don't think the value of including Changelog.md in a gem release is high enough to bloat the size of the gem so much.

What do y'all think about excluding it from gem releases? Or, if you do want to include it, you could periodically prune it to the last N versions or something. Whatever policy is chosen here, probably worth doing in the other rspec gems, too.

Thoughts?

@JonRowe
Copy link
Member

JonRowe commented Feb 20, 2021

I don't see a reason why we couldn't prune the maintenance branch change log to just that branch so that releases contain a subset

@benoittgt
Copy link
Member

I don't think we should include it.

@sriedel
Copy link

sriedel commented Apr 22, 2021

My 2 cents as a user: I don't think it's neccessary to trim the changelog; the size reported by rubygems.org is the size of the .gem file, which is compressed and text files usually compress well. So comparing the uncompressed size of the changelog to the compressed size of the total gem file can lead you to wrong conclusions. The installed size of rspec-core-3.10.1 for me is ~790k:

rspec-core-3.10.1 ((v0.8.0))$ du -ch
4.0K	./exe
36K	./lib/rspec/core/bisect
132K	./lib/rspec/core/formatters
20K	./lib/rspec/core/mocking_adapters
8.0K	./lib/rspec/core/project_initializer/spec
12K	./lib/rspec/core/project_initializer
640K	./lib/rspec/core
652K	./lib/rspec
652K	./lib
784K	.
784K	total

So while the Changelog does make up a large amount of the gems total size, it's more in the range of 13%.
In environments where you're optimizing for size (e.g. production docker containers), you'd be excluding bundles test group most of the time anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants