mudge / re2

Ruby bindings to RE2, a "fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python".
http://mudge.name/re2/
BSD 3-Clause "New" or "Revised" License
129 stars 13 forks source link

Make `rake gem` download source tarballs automatically #89

Closed stanhu closed 1 year ago

stanhu commented 1 year ago

Previously scripts/test-gem-build would call rake compile just to make mini_portile2 download the source tarballs. However, this needlessly compiles abseil and libre2 before building the gem.

To improve this, split the loading of the recipes into a separate file (ext/re2/recipes.rb). The rake prepare step invokes the download method to download the required tarballs in preparation for building the gem.

Now we add a rake prepare task that will run if rake gem is run.

stanhu commented 1 year ago

Big picture question: could we simplify any of the new build code if we vendored the re2 and abseil archives into ports/archives and committed them to source control? That way, they'd always be present in CI and we could even include them in the gemspec (unless we were compiling a native gem in which case they are already removed)?

Probably, but do you really want to commit tarballs into Git?