racc icon indicating copy to clipboard operation
racc copied to clipboard

Split/fork off racc-compiler

Open zenspider opened this issue 4 years ago • 3 comments

Right now dependencies on the compiler are screwed over by racc (runtime) having a faux-gemspec that ships with ruby. Splitting out the compiler would make it trivial to have a developer dependency on the compiler and a runtime dependency on the regular racc gem.

I'm (very) happy to do the work to split it out if this is approved.

zenspider avatar Apr 25 '21 22:04 zenspider

We generate a parser during development and commit it. Later we run tests in bundler. Prior to Ruby 3.3, the generated parser could always require racc since it was a default gem. But in 3.3 it's a bundled gem. So it needs to be added to our Gemfile when running tests.

One possible workaround I found is to use racc --embedded so that the racc runtime is inlined into the generated parser and we no longer have a runtime dependency on racc

joshcooper avatar Sep 12 '24 20:09 joshcooper

@joshcooper that is hellishly slow compared to using the C extension.

zenspider avatar Sep 12 '24 23:09 zenspider

Yep just was mentioning that as a possible workaround (in our case we just need to run some tests).

joshcooper avatar Sep 13 '24 15:09 joshcooper