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

Only ship the required libs in the gem artifact #20

Closed
wants to merge 1 commit into from
Closed

Only ship the required libs in the gem artifact #20

wants to merge 1 commit into from

Conversation

tas50
Copy link

@tas50 tas50 commented Dec 21, 2018

This removes the test and development files from the gemspec so that
these files don't have to be installed on every end users system. This
helps to reduce install size for applications that bundle this gem. It
reduces the compressed gem size by 3.5x.

Side note: If this is a change that's ok with you I'd like to make it to your other
projects. We're loving all of them, but we're trying to keep our package sizes
down.

Signed-off-by: Tim Smith tsmith@chef.io

This removes the test and development files from the gemspec so that
these files don't have to be installed on every end users system. This
helps to reduce install size for applications that bundle this gem. It
reduces the compressed gem size by 3.5x.

Signed-off-by: Tim Smith <tsmith@chef.io>
@coveralls
Copy link

Coverage Status

Coverage increased (+1.2%) to 98.729% when pulling d30aa72 on tas50:master into 609407e on piotrmurach:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+1.2%) to 98.729% when pulling d30aa72 on tas50:master into 609407e on piotrmurach:master.

@piotrmurach
Copy link
Owner

Hey Tim,

Thanks for contributing to pastel!

I'm all for swapping git for direct file loading.

There is however another issue which is to do with what files should gem be distributed with? I'm leaning towards including all necessary build files such as Rakefile and spec directory. Why is that? Gems are tarballs of source code and as such I believe should contain project code and setup.

My gems are packaged for different distributions such as Debian, FreeBSD or ArchLiniux that use the source code to run tests against specific distro before cutting release. It is a generally good practice across different languages to include test suite in distribution of your code. The GNU tools are tarballs that include their build systems and when installed make checks their integrity etc...

This is not a binary derivative of software but the source code itself. For a second, let's assume that GitHub stops to exists as a source code repository(rubyforge and google code died before) then all the software I have released would have just a fraction of necessary files.

The fact that tests are installed on a user's machine when they install a particular gem is a shortcoming of rubygems. It's the same with documentation. You can opt out from installing documentation but you cannot for now opt out from installing tests.

What do you think? I'm keen to make the right choice!

@piotrmurach
Copy link
Owner

@tas50 Would be keen to know your opinion/ideas/thoughts?

@piotrmurach
Copy link
Owner

The latest release v0.7.3 reduces the compressed size by half from 48KB to 24KB

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.

None yet

3 participants