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

Shrink gem size #161

Merged
merged 1 commit into from Jul 1, 2021
Merged

Shrink gem size #161

merged 1 commit into from Jul 1, 2021

Conversation

brunoarueira
Copy link
Contributor

No description provided.

@hsbt
Copy link
Member

hsbt commented Jun 17, 2021

There is no effect to reduce file size with this change.

See

$ rake build
racc 1.5.2 built to pkg/racc-1.5.2.gem.
$ mv pkg/racc-1.5.2{,-org}.gem
$ git checkout -b brunoarueira-feat/shrink-gem-size master
  git pull https://github.com/brunoarueira/racc.git feat/shrink-gem-size

Switched to a new branch 'brunoarueira-feat/shrink-gem-size'
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 3 (delta 2), reused 3 (delta 2), pack-reused 0
Unpacking objects: 100% (3/3), 697 bytes | 139.00 KiB/s, done.
From github.com:brunoarueira/racc
 * branch                  feat/shrink-gem-size -> FETCH_HEAD
Merge made by the 'recursive' strategy.
 racc.gemspec | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
$ rake build
racc 1.5.2 built to pkg/racc-1.5.2.gem.
$ ll pkg/*.gem
.rw-r--r-- hsbt staff 433 KB Fri Jun 18 08:31:34 2021  racc-1.5.2-org.gem
.rw-r--r-- hsbt staff 433 KB Fri Jun 18 08:32:11 2021  racc-1.5.2.gem

@brunoarueira
Copy link
Contributor Author

brunoarueira commented Jun 18, 2021

Interesting, because I've seen the contents of test folder inside one docker image I've built and only this folder is the main size under racc. I'll check tomorrow and return! Thanks anyway 😄

@olleolleolle
Copy link
Contributor

olleolleolle commented Jun 18, 2021

👋 Hi!

I saw that this changes the set of "test_files", which are no longer recommended to set, nor are they used by RubyGems. Source: 2014 comment by a maintainer of RubyGems' guides. rubygems/guides#90 (comment)

So: One change would be to not keep the test_files around in the gemspec, unless this repo is using that setting for anything.

@brunoarueira
Copy link
Contributor Author

Hey @hsbt @olleolleolle,

Sorry for the delay!

I've checked and following the suggestion made by @olleolleolle, removing the test_files from gemspec improves greatly the gem size. See the added output:

❯ ll pkg/
total 1032
-rw-r--r--  1 brunoarueira  staff    76K Jun 30 17:30 racc-1.5.2.beta.gem
-rw-r--r--  1 brunoarueira  staff   438K Jun 30 17:29 racc-1.5.2.gem

The beta is the one with test_files removed and the last was the original approach.

@hsbt hsbt merged commit 7a71a25 into ruby:master Jul 1, 2021
@brunoarueira brunoarueira deleted the feat/shrink-gem-size branch July 1, 2021 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants