>>> Ah, perhaps adding some checks to extconf.rb would be useful?
>>> Or moving the ragel invocation into the extconf.rb-generated
>>> Makefile? (not too sure how to do that...).
>> 
>> Not really no. And it would make ragel a build dependency.
> 
> No, the generated .c file would still be distributed with the
> gem as it is today.

I meant if the gem is used as a "git gem" through bundler.
That's why some other gems like puma commit the generated
.c files.

> Changing the .rl file might result in ragel running (or emit
> warning if ragel isn't installed).  Not too sure how to do that
> via mkmf, though...  Or it would just throw a warning and drop a
> hint to run "make ragel" at the top-level if the .c file is
> missing...

The thing is ragel isn't part of packages such as build-essentials
etc. So really it wouldn't help much.

It just took me a while to figure out because I was tired, but in
the end it wasn't that bad: 
https://github.com/Shopify/unicorn/compare/upstream-master...Shopify:ruby-3.0




Reply via email to