polishing ruby by ryan davis

ParseTree EOL

Published 2009-04-21 @ 19:13

There seems to be some confusion and/or panic about ParseTree that I’d like to clear up:

ParseTree is dead on ruby 1.9 and there is no plan to make it work.

Because of changes to internals in 1.9, ParseTree simply can not work. I asked for hooks/options to allow us to get to the information but they never arrived.

Specifically if you’re using ParseTree to access the AST of a live method/block/proc, you’re SOL. If you’re just using ParseTree to do static analysis, then you can switch to ruby_parser in about a minute of work and you’re good to go.

Here is the plan for my projects:

I don’t know the status of most of the projects dependent on PT or how they’re going to deal with this issue. If you use one of these projects directly or indirectly and that project relies on PT for live method/block/proc, then you’re probably going to be stuck on 1.8 for a while:

There are probably other projects out there dependent on PT that I don’t know about. All I’ve listed here are rubyforge gems that depend on PT in their gemspec.

You can check your gems using this:

  gem list | egrep "(ambition|argible|integrity|merb-action-args|nitpick|protocol|red|reek|roodi|ruby_diff|rubyjs|sake|thorero-action-args)"