zynaddsubfx / zyn-fusion-build

Build Scripts For Zyn-Fusion
Do What The F*ck You Want To Public License
122 stars 39 forks source link

Old mruby version raises error during clean phase with system 3.0.0 ruby #68

Closed fundamental closed 3 years ago

fundamental commented 3 years ago

Looks like it's time to update the mruby version. This is going to be 'fun'. I can see that they've changed how values are boxed, though it's unclear if there's other issues going on at the same time. Usually there's some issues with instance_eval, but who knows perhaps those bugs are a thing of the past.

fundamental commented 3 years ago

https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/ makes it look like method(baseargs, extendedargs) now has become method(baseargs, **extendedargs). AFAIK the latter should work with older ruby versions as well. Looks like that's the easier option (just have a patch which applies to the FileUtils code which seems to be the area that's broken.

If I wasn't skeptical about instance_eval working I'd say the update of mruby would be the easiest. It looks like it should be possible to just use MRB_NO_BOXING and get the old behavior, but let's see about that.

fundamental commented 3 years ago

Looks like there's a limit on how many classes can be defined in a single file. Not sure if that was a thing in the past which was causing silent breakages, but it's an error condition in codegen.c now. It looks like the solution will be to split fcache.rb into two files. I think the irep->rlen condition code is per file initializer. (I tried to just swap it out with a uint16 value from a uint8 value, but it looks like the irep rlen is used to generate code, rather than just behind the scenes bookkeeping).

If breaking fcache.rb into multiple files doesn't work then we've got a bigger issue on our hands, but I can't imagine there being a per gem limitation of something like 255 max exported classes, so I doubt it's a complete blocker.

fundamental commented 3 years ago

The upgrade was finished a while ago I guess I forgot to close out this issue.