jonatas / fast

Find in AST - Search and refactor code directly in Abstract Syntax Tree as you do with grep for strings

Home Page:https://jonatas.github.io/fast/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Outdated parser dependency

zverok opened this issue · comments

Hey 👋 (long time no see)

Do you still maintain the project, or did you find other ways to achieve the same goals?
I tried to use it recently (via my the_schema_is gem), and noticed this problem:

  In Gemfile:
    the_schema_is was resolved to 0.0.3, which depends on
      ffast (>= 0.1.8) was resolved to 0.2.0, which depends on
        astrolabe was resolved to 0.5.1, which depends on
          parser (~> 2.1)

    rubocop (= 1.14.0) was resolved to 1.14.0, which depends on
      parser (>= 3.0.0.0)

Seems that astrolabe haven't been updated recently and even the latest version specifies ~> 2.2 as parser dependency, meaning there is no way to use ffast in the same project as (modern) rubocop 😢

Hello @zverok! I think the most advanced way to achieve the same goals is using the rubocop-ast gem. It's much reliable and fully compatible with RuboCop syntax which I deviated a bit 😄

I haven't updated it for a while. I'll try to find some time in the next few days to update the libraries to keep it. I have the plan to move the fast to use RuboCop AST as you can see on #23.

I moved to TimescaleDB and now I'm interested in making it fully compatible with SQL language :)

I also ran into this issue recently astrolabe 1.3.1 depends on parser 2.2 which uses 2.7 Ruby syntax which I think is breaking on Ruby 3.1 code.

I think I'm going to migrate over the last parser and get rid of astrolable. Feel free to submit a PR if you want to collaborate :)

Hey @silasb , also this project is my hobby project, so if you're looking for up to date work with more validation and production proof, take a look on rubocop-ast.