The discussion revolves around supporting Discourse on TruffleRuby. bjfish has requested three changes to achieve this:
Update bin/rails to disable unicorn when fork is not supported, as TruffleRuby does not support forking.
Disable mini_profiler for TruffleRuby, as Stackprof is not currently supported.
Prevent rbtrace from loading.
gerhard noted that mini_racer not being supported on TruffleRuby is a major blocker. bjfish is working on a branch with most of the mini_racer functionality passing the test suite using GraalJS for TruffleRuby.
sam suggested that mini_profiler can still provide value on TruffleRuby and recommended not loading rbtrace and stackprof instead. gerhard created a PR with the requested changes but encountered a java.lang.NullPointerException. He completely disabled mini_profiler for now due to a SystemStackError.
BTW: Has anything changed about mini_racer not being supported on TruffleRuby? That’s a major blocker.
I have a branch with most of the mini_racer functionality passing the test suite using using GraalJS for TruffleRuby. I believe it handles all of the functionality needed for Discourse. It just needs to be reviewed and I’ll then I’ll try to get it merged. This is how I’ve been running it locally: https://twitter.com/brandonfish/status/1486755128577253376
I still couldn’t get it to run successfully, there was a java.lang.NullPointerException, but that might be just me crudely disabling mini_racer. I’m really looking forward to seeing a fully functional Discourse running on TruffleRuby.
I didn’t look into this any further, but I noticed an error when I only disabled loading of stackprof and memory_profiler. So I completely disabled mini_profiler for now.
2022-05-04 21:48:13 +0200 Rack app ("POST /mini-profiler-resources/results" - (127.0.0.1)): #<SystemStackError: stack level too deep
from StackOverflowCheckImpl.java:328:in `com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.newStackOverflowError0'>
It might have been a side effect of other problems. I guess we could investigate when other problems are solved.