Closed stanhu closed 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?
Previously
scripts/test-gem-build
would callrake 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
). Therake prepare
step invokes thedownload
method to download the required tarballs in preparation for building the gem.Now we add a
rake prepare
task that will run ifrake gem
is run.