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

Exclude ext from binary gems #152

Open
glebm opened this issue May 9, 2019 · 5 comments
Open

Exclude ext from binary gems #152

glebm opened this issue May 9, 2019 · 5 comments

Comments

@glebm
Copy link

glebm commented May 9, 2019

Not sure if this is the right repo for this feature request, but it'd be cool if rake-compiler automatically excluded the entire ext directory from gem files for precompiled gems.

@larskanis
Copy link
Member

Could you please request this at the rake-compiler repository?

@glebm
Copy link
Author

glebm commented May 11, 2019

GitHub now supports moving issues to another repo!

https://help.github.com/en/articles/transferring-an-issue-to-another-repository

But I can't do it, only someone who is a maintainer of both repos can do it.

@larskanis larskanis transferred this issue from rake-compiler/rake-compiler-dock May 11, 2019
@larskanis
Copy link
Member

Excluding files is already possible when making use of the cross_compiling block like here in nokogiri. Since it's so simple to exclude files but more difficult to re-add in case they are needed somehow, I'm not convinced that we should change it.

@glebm
Copy link
Author

glebm commented May 11, 2019

They shouldn't ever be needed, ext is only supposed to be used for compilation, and all the artefacts should go into lib (https://guides.rubygems.org/gems-with-extensions/).

Some OS package managers also delete the ext directory when packaging ruby gems as system packages (we had a related issue here sass/sassc-ruby#95).

Anyway, thanks for the tip, I hadn't realized it was that easy to exclude them!

Perhaps we could add removing ext to the example in the Readme, as this is the right thing to do most of the time, if not always?

@kou
Copy link
Member

kou commented May 13, 2019

We can't determine what should we remove for extension perfectly.
For example:

So, adding some description to README is reasonable.
Could you create a pull request for this?

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

3 participants