Skip to content

Trim down gemspec files to bare necessities#6

Merged
jarthod merged 1 commit into
jarthod:masterfrom
brunodccarvalho:master
Mar 8, 2026
Merged

Trim down gemspec files to bare necessities#6
jarthod merged 1 commit into
jarthod:masterfrom
brunodccarvalho:master

Conversation

@brunodccarvalho
Copy link
Copy Markdown

Hello, was working on optimizing some pipelines in my app and noticed that one of the largest gem size contributors was

7936	vendor/ruby/3.4.0/bundler/gems/whois-parser-66fbb9ae3548/spec/fixtures
...
13184	vendor/ruby/3.4.0/bundler/gems/whois-parser-66fbb9ae3548/spec
...
16112	vendor/ruby/3.4.0/bundler/gems/whois-parser-66fbb9ae3548

Two things:

  1. git ls-files in the gemspec is expanded at build time (?), an installed gem has an actual list of files inlined there 😄
  2. All files are included instead of just the usual necessities like lib. In particular some ~3M characters worth of tests.

I imagine both issues were carried over from the fork. I am also aware the second one doesn't get fixed unless you make a gem release — any chance you could do that?

Thanks

@jarthod
Copy link
Copy Markdown
Owner

jarthod commented Mar 8, 2026

Hi and thanks for your contribution. This is indeed a good case for when specs are much larger than code and packaging only the code is noticeably beneficial. This git syntax is expanded at build time yes, and was carried from the fork.

Your changes looks good to me. But the problem is I can't make a gem release as the gem still belongs to @weppos and he did not show any recent interest in maintaining or delegating it. So if you install my fork from github as recommended, I'm not sure the file list will be used, you'll probably end up with the same amount of files.

I may release this fork under another name at some point, but that would kill any chance of merging back upstream so I've been delaying that for as long as possible.

I just merged this PR, let us know if it changes anything for your pipelines.

@jarthod jarthod merged commit 19bd6a3 into jarthod:master Mar 8, 2026
9 checks passed
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

Successfully merging this pull request may close these issues.

2 participants