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

OSS Gate Workshop: Akatsuki: 2018-04-23: ryuya.takahashi: Kemal: Work log #825

Closed
tobyapi opened this issue Apr 23, 2018 · 50 comments
Closed

Comments

@tobyapi
Copy link
Contributor

tobyapi commented Apr 23, 2018

This is a work log of a "OSS Gate workshop".
"OSS Gate workshop" is an activity to increase OSS developers.
Here's been discussed in Japanese. Thanks.

作業ログ作成時の説明

以下のテンプレートを埋めてタイトルに設定します。埋め方例はスクロールすると見えてきます。

OSS Gate Workshop: ${LOCATION}: ${YEAR}-${MONTH}-${DAY}: ${アカウント名}: ${OSS名}: Work log

タイトル例↓:

OSS Gate Workshop: Tokyo: 2017-01-16: kou: Rabbit: Work log

OSS Gateワークショップ関連情報

  • スライド:ワークショップの進行に使っているスライドがあります。
  • チャット:OSS開発に関することならなんでも相談できます。ワークショップが終わった後もオンラインで相談しながら継続的にOSSの開発に参加しましょう!
  • シナリオ:ワークショップの目的・内容・進め方の詳細が書いています。
  • 過去のビギナーの作業ログ:他の人の作業ログから学べることがいろいろあるはずです。
@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

👀

@apstndb
Copy link
Contributor

apstndb commented Apr 23, 2018

LGTM

@TakanoriHosoya
Copy link
Contributor

みた!

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

まず最新のCrystalをインストールする

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

前どこにCrystalをインストールしたのか忘れた

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

which crystal

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

which crystal -> brew でインストールしたのか、普通に落としてインストールしたのか忘れた

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

前HomeBrew使う方法が書いてなくて、どちらだったか

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

brew でインストールされているかどうか試してみるコマンドは?ググってみる

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

Homebrew使い方まとめ みて brew list 実行

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

crystal-lang あった!

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

) crystal --version
Crystal 0.24.2 (2018-03-10)

LLVM: 5.0.1
Default target: x86_64-apple-macosx

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

https://github.com/crystal-lang/crystal/releases で最新かどうかをチェック

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

Crystalは1.0が出ていない新しい言語で、頻繁に更新があるので、最新を使ったほうが良いと思った

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

最新版が公式サイト には書いてない...。
ここにバージョンが書いてあると嬉しい!

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

Homebrewの最新版ってどうやって更新されているか?
アップデートポリシーってどうなっているか?書いてあると嬉しいなぁ

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

https://brew.sh/ だとパッと見つからない? https://docs.brew.sh/ 見てみる

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

https://docs.brew.sh/FAQ
にはパット見で書いてないように思った。タイトル見て書いてなさそうだな。

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

https://docs.brew.sh/Versions も違う
多分Homebrewという団体が全てを管理しているわけじゃなさそう
世の中には無限にパッケージがあって、一つの組織が管理するのは現実的ではなさそうだな

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

Homebrewに登録されているはず!
使う人にとってはこれで十分、フレームワークの開発をする人向けの言語のバージョン管理方法は書いてないので。
Crystal の言語のステータスが開発中である。1.0 はこれで十分。
1.0 が出ているとしたら、 https://crystal-lang.org/docs/installation/on_mac_osx_using_homebrew.html には

  • CLIみたいな、REPLのインストール方法が書いてない
  • バージョン指定で入れる方法が書いてない
  • 最後のバージョン確認方法も書いてない

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

kemal 使う

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

(Crystalのインストールが終わったので)

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

で、Hello world をまず表示させてみたい

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

https://github.com/kemalcr/kemal のREADMEを読みつつ進める

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

crystal の使い方を忘れた

) crystal help
Usage: crystal [command] [switches] [program file] [--] [arguments]

Command:
    init                     generate a new project
    build                    build an executable
    deps                     install project dependencies
    docs                     generate documentation
    env                      print Crystal environment information
    eval                     eval code from args or standard input
    play                     starts crystal playground server
    run (default)            build and run program
    spec                     build and run specs (in spec directory)
    tool                     run a tool
    help, --help, -h         show this help
    version, --version, -v   show version

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

https://github.com/kemalcr/kemal#installation から始める

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

crystal init app hello_world

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

hello_world アプリ作る

) crystal init app hello_world
      create  hello_world/.gitignore
      create  hello_world/.editorconfig
      create  hello_world/LICENSE
      create  hello_world/README.md
      create  hello_world/.travis.yml
      create  hello_world/shard.yml
      create  hello_world/src/hello_world.cr
      create  hello_world/src/hello_world/version.cr
      create  hello_world/spec/spec_helper.cr
      create  hello_world/spec/hello_world_spec.cr
Initialized empty Git repository in /Users/ryuya.takahashi/Workspace/oss-gate/hello_world/.git/

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

(これはkemalのREADMEには書いてない)

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

https://github.com/kemalcr/kemal#super-simple-%EF%B8%8F
に書いてあるコードをコピペ

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

https://github.com/kemalcr/kemal#super-simple-%EF%B8%8Fに書いてある crystal src/kemal_sample.cr ではなく、 crystal src/hello_world.cr

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

crystal deps get 忘れた

± crystal src/hello_world.cr
Error in src/hello_world.cr:2: while requiring "kemal": can't find file 'kemal' relative to '/Users/ryuya.takahashi/Workspace/oss-gate/hello_world/src'

require "kemal"
^

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

crystal deps get が必要っぽいが、 crystal-lang/crystal#5510 消えてる!!

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

crystal deps 消えてた
crystal-lang/crystal#5510

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

思ったこと

  • crystal を初めて触る人が動かせるようなドキュメントになっていない
    • crystal-lang の Installation へのリンクが無い
    • 依存関係に従ってライブラリをダウンロードするコマンドが書いてない
    • 対応するcyrstalのバージョンが書いてない
    • プロジェクトを作るところが省略されている

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

大丈夫だったやつ

crystal-lang の Installation へのリンクが無い
依存関係に従ってライブラリをダウンロードするコマンドが書いてない
プロジェクトを作るところが省略されている

大丈夫じゃなかったやつ

対応するcyrstalのバージョンが書いてない

新しいリンクを追加することで、大丈夫だったやつは解決するが、大丈夫じゃなかったやつは解決しない。Crystal のバージョンを表すバッジがあればあとで追加したい。

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

バージョンを表すバッジを追加するというフィードバックは、一つのissueにするにはタスクの粒度が細かすぎるので、上と同じPRで書いた方が良さそうだ。

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

課題

Crystal をインストールして Kemal を動かそうとしたが、以下の3つの点がドキュメントにあると親切だと思った:

  • Crystal の Installation へのリンク
  • 依存するライブラリを取ってくるコマンド
  • プロジェクトを作るコマンド

Kemal の公式ドキュメントの Getting Started にはこの3つが書かれていてわかりやすいので、そこへのリンクを追加した。

変更内容

Kemal 公式ドキュメントの Getting Started へのリンクを、 README.md の Installation に追加した。

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

似たようなFormatで書いているPRが無いか探してみた: no descption が結構あった
こういう感じだったら「今想像しているくらい丁寧にかけば伝わるであろう」と思った

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

kemalcr/kemal#426 の書き方は良い

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

Improve Installation in README

Getting Started in Kemal's official document is clear. Commands from installation of Crsytal-lang to application creation are not omitted. I added a link to Getting Started into Installation.

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

  1. kemal を fork する
  2. kemal を clone する
  3. README.md 書き換える
  4. 変更をプッシュする
  5. PR にする

@tobyapi
Copy link
Contributor Author

tobyapi commented Apr 23, 2018

既にあったのでリポジトリ消す

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

2 と 3の間で、Branchを作る

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

と思ったけど、他の人のPRを見てブランチはmasterでも良いのではないかと思った。
もうちょっと周りのPRを見てみる

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

kemalcr/kemal#427 は master to master だったけど、 kemalcr/kemal#410 を見て、ブランチを切ることにした

@csouls
Copy link
Contributor

csouls commented Apr 23, 2018

🎉 🎉 🎉 kemalcr/kemal#445

@kou
Copy link
Member

kou commented Apr 23, 2018

お疲れ様でした!
この時間じゃないと取り組んじゃいけないわけではないので、引き続きやっていきましょう!

@kou kou closed this as completed Apr 23, 2018
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

No branches or pull requests

5 participants