gem-compiler icon indicating copy to clipboard operation
gem-compiler copied to clipboard

add support for explicitly specifying some artifacts to add

Open doudou opened this issue 6 years ago • 7 comments

The 'rice' gem has bunch of files in ruby/lib that is not part of the gem proper - it is to be used by the libraries. It's obviously a misuse of the Rubygems system, but a useful one so far.

This adds the --artifact PATH argument that allows to:

  • add a file explicitly
  • add a complete directory tree

doudou avatar Oct 31 '19 21:10 doudou

Hello @doudou, thank you for your PR and providing the background of this request.

I haven't looked into the code yet but planning this weekend. Will also try to correct the CI issues so is no longer showing incorrect errors.

Thanks for your patience.

Cheers.

luislavena avatar Nov 05 '19 11:11 luislavena

Hi Luis.

Heads up that I'm already preparing a v2 version of this PR ... I never realized how powerful Dir.glob is, and am thinking of directly allowing passing globs instead of files.

doudou avatar Nov 06 '19 15:11 doudou

Updated ...

doudou avatar Nov 07 '19 12:11 doudou

Hello @doudou, thanks for your patience.

Been looking at this change over the holidays and this might clash or could be refactor so --include-shared-dir can reuse this pattern globing option.

Will work on this over the holidays and submit an alternate version.

Cheers.

luislavena avatar Jan 02 '20 22:01 luislavena

Hello @doudou, thanks for your patience.

I was working on a different approach on this and wanted to check with you the exclude pattern functionality.

From this PR, you're removing files from artifacts, which is by default the platform specific files that were collected, but not necessarily impacting the files that are included in the gem package.

Should include and exclude patterns be applied to the final list of files and not just the collected artifacts? I'm seeing an scenario for this like the following:

$ gem compile mygem.gem --exclude 'ext' --exclude 'spec'

Let me know your thoughts.

Cheers.

luislavena avatar May 21 '20 10:05 luislavena

Should include and exclude patterns be applied to the final list of files and not just the collected artifacts? I'm seeing an scenario for this like the following:

I don't see a problem with that.

doudou avatar May 21 '20 13:05 doudou

Excellent @doudou, wanted to confirm since your current PR applies this to collected artifacts and not all the files in the gemspec.

Will submit an alternative version in the upcoming days to address this.

Thank you for your patience and responses.

Cheers.

luislavena avatar May 21 '20 17:05 luislavena