tom-lord / regexp-examples

Generate strings that match a given regular expression
MIT License
521 stars 31 forks source link

1.6.0 no longer is a pure ruby install #41

Open cabo opened 3 months ago

cabo commented 3 months ago

Some of the users of the cddl tool are using a CI environment that doesn't provide for native builds. Since 1.6.0, regexp-examples needs regexp_property_values, which appears to need a native build. This means the CI chains now fail. Is there a way to use regexp-examples without requiring a native build?

tom-lord commented 3 months ago

As commented here:

regexp_property_values ... includes C-extensions. The extensions are optional, and the fallback code has successfully been used in some non-C-Ruby environments, but I wouldn't vouch for them to work in every exotic setup

I didn't test this library on non-native builds, so haven't experienced an error. The mentioned dependency claims to have optional extensions, and I see the key code to support it is here. Maybe the issue would be better raised in that project, if you have an installation error?

Barring that, you may have to stick with v1.5.x of this gem.

cabo commented 3 months ago

I didn't test this library on non-native builds, so haven't experienced an error. The mentioned dependency claims to have optional extensions, and I see the key code to support it is here. Maybe the issue would be better raised in that project, if you have an installation error?

The code is great; the problem is that bundler and gem do not know that this is a conditional dependency. So you cannot gem install or bundle install 1.6.0 without a compiler. The question is how to create such a conditional dependency.