Search code examples
rakurakudorakudo-star

RAKUDO_RAKUAST=1 raku --target=ast is not yet available


It has been almost a year since I saw Jonathan Worthington presenting the new RakuAST in the YouTube video A Raku API to Raku programs the journey so far from TRC 2021. In the video, he showed that we could dump this new RakuAST using RAKUDO_RAKUAST=1 like this:

RAKUDO_RAKUAST=1 raku --target=ast -e 'say [*] 1..10'

I'm using the lasted version of RakudoStar, and yet, the command above still dumps the old QAST tree.

What is happening here?

Why doesn't it show the new RakuAST and how can I compile rakudo the right way so that it does?

For the build, I use the instruction on this page https://rakudo.org/downloads/rakudo/source for Linux with a slight modification because the instructions are slightly outdated. This is what I do instead of what the page tells me to (It worked previously but not anymore):

sudo perl Configure.pl --backends=moar --gen-moar --gen-nqp

Solution

  • You need to checkout and build the rakuast branch of Rakudo. The RakuAST work is still very much in progress, and has not landed in the main branch let.