ParseTree EOL

| | Comments (3)

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:

  • RubyToC-1.0.0.5 = switching to ruby_parser
  • flog-2.1.0 = switching to ruby_parser
  • heckle-1.4.2 = dead, unless we can think of something soon.
  • ruby2ruby-1.2.2 = dropping block/proc support.
  • ruby_parser-2.0.2 = no clue why it has a dependency still, no worries here.
  • ZenHacks-1.0.1 = dropping block/proc support -- not that I support this.

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:

  • SuperCaller-1.0.0 = unsupported - can drop live method support
  • ambition-0.5.4
  • argible-0.1.1
  • integrity-0.1.9.3
  • merb-action-args-1.0.11
  • nitpick-1.0.2
  • protocol-0.8.1
  • red-4.1.7
  • reek-1.0.0 = probably doesn't need live analysis
  • roodi-1.3.5
  • ruby_diff-0.2
  • rubyjs-0.8.0
  • sake-1.0.15
  • thorero-action-args-0.9.4

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)"

3 Comments

For merb-action-args, it is possible to survive by using methopara

I think there are some projects that can survive by using same manner :-)

Reek offers matchers for Rspec that allow you to write examples such as:

MyClass.should_not reek

This is the only feature of Reek that will disappear under 1.9, and even there I have some ideas that may rescue it somewhat. So Reek's next release will use ruby_parser, and will additionally offer the Rspec matchers if it detects an installation of ParseTree that it can use.

You might could use {Method, Proc}#source_location to 're extract' the source. Might. I'd be happy to code up a hack for it if interested. -=r

Leave a comment

About this Entry

This page contains a single entry by zenspider published on April 21, 2009 7:13 PM.

rubygems now has plugins! was the previous entry in this blog.

wilson version 1.0.1 has been released! is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.32-en