Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AST manipulation, for remove sourcify #14

Merged
merged 2 commits into from
Apr 6, 2014

Conversation

joker1007
Copy link
Collaborator

maintenance of sourcify gem is not active.
because sourcify depends on old ruby_parser gem, some gem cause dependency collision.
I want to remove sourcify.

I write proc_to_ast.
this work like sourcify but more simple and lightweight.
this depends on whitequark/parser and mbj/unparser.
these gem is updated actively.

And I rewrite AST manipulation code, in order to adapt to above gems.
Current test code is all passed.

But I think that Proc to_source conversion and AST manipulation are still dangerous.
So, if you don't want to merge, close this PR.

英語が不安なので、一応日本語でも書いておきます。
sourcifyが古くなっていて、古いruby_parserに依存しているので何とかしたかったんですが、sourcifyをフォークするのも辛いので、自前でsourcifyの機能に近いものを書きました。

それに合わせてASTを弄る処理を一通り書き直して、とりあえず動作するようにはしました。
しかし、Procのコードのパースはかなり手抜きの実装になっていて、ASTの抽出があらゆるパターンでちゃんと動作するかは微妙です。パフォーマンスも余り考慮していません。
なので、PRは出させてもらいましたが、無理にマージしてもらう必要はありません。

Change dependent libraries,
because sourcify is not active project.
@tomykaira
Copy link
Owner

seems very good.
let me check details

@tomykaira
Copy link
Owner

At least it works. We want to add fixes when problems are found

tomykaira added a commit that referenced this pull request Apr 6, 2014
Fix AST manipulation, for remove sourcify
@tomykaira tomykaira merged commit 1a2a1ec into tomykaira:master Apr 6, 2014
@tomykaira
Copy link
Owner

Released as 0.1.0 (because it has no internal compatibility)

@joker1007
Copy link
Collaborator Author

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants