crystal-jp / introducing-crystal

『Introducing Crystal Programming Language』の原稿をまとめたリポジトリです
https://crystal-jp.github.io/introducing-crystal/
17 stars 3 forks source link

Bump Crystal to 0.36.1 #64

Closed kachick closed 3 years ago

kachick commented 3 years ago

全ての本文中の example code を 試してみたわけではないのですが、 bundle exec rake test が通るところまで持っていったので PRを出してみます!

最低限、以下に対する変更が必要なようでした。

特に parallel macro に関してなのですが、最初 spec は Time.new に関して https://github.com/crystal-lang/crystal/pull/8646 の影響で落ちているようでした。 なのでそこだけ Time.lcoal に変えればなんとかなるのかな?と思ったのですが、次は timecop 側の対応がまだのようで、 最新リポジトリと思しき https://github.com/crystal-community/timecop.cr へ shards を向けて見たりしたのですが・・・ そもそも https://github.com/crystal-lang/crystal/pull/9097 で macro 自体削られているようで、作者の方も https://github.com/crystal-lang/crystal/issues/7204#issuecomment-448767867

We introduced parallel just for fun, to see if we could make it work. In my opinion we should remove all these quick features (parallel, future, etc.), rethink them, then reintroduce them.

と言っており、軽くdocument を探した限り代わりとなる macro 等はまだ用意されてい無さそうでしたので、思い切ってばっさりと本文中からも削ってみました。

また、 https://github.com/crystal-jp/introducing-crystal/blob/fad5fa88a0fc134eed61155ccdb224b7b9dae79b/.circleci/config.yml#L6 に関しては update しないとおそらくCIも通らないだろうなと思っているのですが、ちょっと方法がわからなかったです。 🙇 & おそらく用意していただいたほうが良いのかな?と思ったのでこのPRでは TODO コメントを付けるに留めています。

makenowjust commented 3 years ago

@kachick 確認の量が多そうなので、レビューは土日まで待ってもらえるとありがたいです。すみません。

kachick commented 3 years ago

あ、全然大丈夫です。 ~ご配慮~ お気遣い頂いてありがとうございます 😄

makenowjust commented 3 years ago

66 経由でマージしました。修正ありがとうございます!!

kachick commented 3 years ago

おぉ、ありがとうございました! 🙏

https://github.com/crystal-lang/crystal/pull/10500 なんかもうすぐ 1.0.0 が release されるのか?みたいな動きも見えてると思うんですが、その際は是非こちらの資料も 1.0.0 に対応してほしいと思っています。今回の Update で 1.0.0 化時の手間が少しでも減ったなら嬉しいです 😇