Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
yard2steep 進捗報告
Search
Nao Minami
July 31, 2018
Programming
0
460
yard2steep 進捗報告
Meguro.rb#17 で yard2steep のリリース後の改善について話しました!
cf.
https://megurorb.connpass.com/event/94480
Nao Minami
July 31, 2018
Tweet
Share
More Decks by Nao Minami
See All by Nao Minami
Real World Migration from HTTP to gRPC #CNDT2020
south37
3
5.7k
Real World Migration from HTTP to gRPC in Ruby #grpcconf
south37
2
4.3k
Getting Things Done をベースにした仕事の進め方 / How to Work with Getting Things Done
south37
7
7.6k
Web API に秩序を与える Protocol Buffers / Protocol Buffers for Web API #builderscon
south37
18
16k
puma v4 では SIGTERM での worker process ゾンビ化に気をつけよう / Be aware of zombie processes in puma v4
south37
0
3.7k
理想的なマイクロサービスアーキテクチャを目指す継続的改善 / Re-architecturing of Microservices #CNDT2019
south37
10
14k
gcpc: Google Cloud Pub/Sub Client for Ruby #tqrk13
south37
1
760
実行計画から学ぶ PostgreSQL の内部動作とクエリ最適化 / Learn PostgreSQL from Explain
south37
8
39k
学びを得るための新卒 ISUCON / New Grad ISUCON for Learning
south37
4
41k
Other Decks in Programming
See All in Programming
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
310
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
EventSourcingの理想と現実
wenas
6
2.3k
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
最新TCAキャッチアップ
0si43
0
140
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.7k
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Code Reviewing Like a Champion
maltzj
520
39k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
We Have a Design System, Now What?
morganepeng
50
7.2k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
Faster Mobile Websites
deanohume
305
30k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Transcript
©2018 Wantedly, Inc. yard2steep ਐḿใࠂ 31.Jul.2018 - Nao Minami (@south37)
©2018 Wantedly, Inc. ࣗݾհ
©2018 Wantedly, Inc. Nao Minami / @south37 Infrastructure engineer @
Wantedly, Inc.
©2018 Wantedly, Inc. ZBSETUFFQ͓͞Β͍ ZBSETUFFQਐḿใࠂ ·ͱΊ ࠓ͢༰
©2018 Wantedly, Inc. ZBSETUFFQ͓͞Β͍
©2018 Wantedly, Inc. ZBSETUFFQͱ
©2018 Wantedly, Inc.
©2018 Wantedly, Inc. ZBSETUFFQͱ w 3VCZϓϩάϥϜதͷ:"3%Ξϊʔςʔγϣϯ ͔Βɺ4UFFQͷܕఆٛϑΝΠϧΛࣗಈੜ w 4UFFQͱΈ߹ΘͤΔࣄͰɺ:"3%Ͱ੩తܕݕ ࠪΛ࣮ݱʂ
©2018 Wantedly, Inc. 3VCZίʔυΛ༻ҙ͢Δ # lib/parser.rb class AST # @return
[String] def to_s "AST" end # @param [Hash] opt def traverse!(opt) end end class Parser # @param [String] text # @param [Hash] opt # @return [AST] def parse(text, opt) ast = AST.new ast.traverse!(opt) ast end end
©2018 Wantedly, Inc. ZBSETUFFQίϚϯυΛ࣮ߦ $ yard2steep lib ZBSETUFFQͰܕఆٛϑΝΠϧΛੜ # sig/parser.rbi
class AST def to_s: -> String def traverse!: (Hash<any, any>) -> any end class Parser def parse: (String, Hash<any, any>) -> AST end
©2018 Wantedly, Inc. TUFFQͰܕνΣοΫ $ steep check lib TUFFQͰܕνΣοΫʂ:"3%ʹΑΔ੩తܕ͚Λ ࣮ݱʂ
©2018 Wantedly, Inc. ੩తܕ͖3VCZʂ
©2018 Wantedly, Inc. ZBSETUFFQਐḿใࠂ
©2018 Wantedly, Inc. ZBSETUFFQਐḿใࠂ ϦϦʔεޙͷػೳՃɾվળ
©2018 Wantedly, Inc. ZBSETUFFQϦϦʔεޙͷվળ w 3VCZQBSTFSͷվળ w ࣗલ࣮͔ΒɺSJQQFSϕʔεͷQBSTFSͱҠߦͨ͠ w ղऍͰ͖ΔSVCZDPEFͷ෯͕͕ͬͨ
w Ϧςϥϧఆͷܕ͚ w ϦςϥϧΛBTTJHOͯ͠࡞ΔఆʹܕใΛ༩͢ΔΑ͏ʹͳͬͨ w BUUS@XSJUFS BUUS@BDDFTTPSͷTVQQPSU w HFUUFSNFUIPEʹ͍ͭͯɺܕఆٛΛੜ͢ΔΑ͏ʹͳͬͨ
©2018 Wantedly, Inc. ZBSETUFFQϦϦʔεޙͷվળ w 3VCZQBSTFSͷվળ w ࣗલ࣮͔ΒɺSJQQFSϕʔεͷQBSTFSͱҠߦͨ͠ w ղऍͰ͖ΔSVCZDPEFͷ෯͕͕ͬͨ
w Ϧςϥϧఆͷܕ͚ w ϦςϥϧΛBTTJHOͯ͠࡞ΔఆʹܕใΛ༩͢ΔΑ͏ʹͳͬͨ w BUUS@XSJUFS BUUS@BDDFTTPSͷTVQQPSU w HFUUFSNFUIPEʹ͍ͭͯɺܕఆٛΛੜ͢ΔΑ͏ʹͳͬͨ
©2018 Wantedly, Inc.
©2018 Wantedly, Inc. 3VCZQBSTFSͷվળ w 3JQQFSTFYQΛར༻ w 3JQQFSTFYQSVCZDPEFΛQBSTFͨ͠USFFߏΛฦ͢ w USFFΛUSBWFSTFͯ͠ཉ͍͠ใΛऔΓग़ͤ0,
w ίϝϯτͷऔಘʹ3JQQFSMFYΛར༻ w 3JQQFSTFYQ3VCZͷಈ࡞ʹӨڹ͠ͳ͍ใʢDGίϝϯτʣΛऔΓআ͍ͯ͠·͏ɻ ίϝϯτऔಘʹผͷखஈ͕ඞཁɻ w 3JQQFSMFYSVCZDPEFͷUPLFOΛฦ͢ɻAPO@DPNNFOUA͕ίϝϯτͳͷͰɺͦΕ Λऔಘɻ
©2018 Wantedly, Inc. ղऍͰ͖Δ3VCZͷ෯͕͕ͬͨʂ
©2018 Wantedly, Inc. ZBSETUFFQϦϦʔεޙͷվળ w 3VCZQBSTFSͷվળ w ࣗલ࣮͔ΒɺSJQQFSϕʔεͷQBSTFSͱҠߦͨ͠ w ղऍͰ͖ΔSVCZDPEFͷ෯͕͕ͬͨ
w Ϧςϥϧఆͷܕ͚ w ϦςϥϧΛBTTJHOͯ͠࡞ΔఆʹܕใΛ༩͢ΔΑ͏ʹͳͬͨ w BUUS@XSJUFS BUUS@BDDFTTPSͷTVQQPSU w HFUUFSNFUIPEʹ͍ͭͯɺܕఆٛΛੜ͢ΔΑ͏ʹͳͬͨ
©2018 Wantedly, Inc.
©2018 Wantedly, Inc. Ϧςϥϧఆͷܕ͚ # lib/sample.rb class MyClass CONSTANT =
"This is constant" CONSTANT2 = /this is re/ CONSTANT3 = :symbol_value CONSTANT4 = 1..2 CONSTANT5 = 34 CONSTANT6 = 2.34 CONSTANT7 = [1, 2] CONSTANT8 = { a: 3 } CONSTANT9 = true CONSTANT10 = false CONSTANT11 = nil end # sig/sample.rbi MyClass::CONSTANT: String MyClass::CONSTANT2: Regexp MyClass::CONSTANT3: Symbol MyClass::CONSTANT4: Range<any> MyClass::CONSTANT5: Integer MyClass::CONSTANT6: Float MyClass::CONSTANT7: Array<any> MyClass::CONSTANT8: Hash<any, any> MyClass::CONSTANT9: bool MyClass::CONSTANT10: bool MyClass::CONSTANT11: nil
©2018 Wantedly, Inc. Ϧςϥϧఆͷܕ͚͕ ग़དྷΔΑ͏ʹͳͬͨʂ
©2018 Wantedly, Inc. ZBSETUFFQϦϦʔεޙͷվળ w 3VCZQBSTFSͷվળ w ࣗલ࣮͔ΒɺSJQQFSϕʔεͷQBSTFSͱҠߦͨ͠ w ղऍͰ͖ΔSVCZDPEFͷ෯͕͕ͬͨ
w Ϧςϥϧఆͷܕ͚ w ϦςϥϧΛBTTJHOͯ͠࡞ΔఆʹܕใΛ༩͢ΔΑ͏ʹͳͬͨ w BUUS@XSJUFS BUUS@BDDFTTPSͷTVQQPSU w HFUUFSNFUIPEʹ͍ͭͯɺܕఆٛΛੜ͢ΔΑ͏ʹͳͬͨ
©2018 Wantedly, Inc.
©2018 Wantedly, Inc. BUUS@XSJUFS BUUS@BDDFTTPSͷTVQQPSU # lib/sample.rb class SomeClass #
@dynamic index, index=, count, count= attr_reader :index attr_writer :index attr_accessor :count end # sig/sample.rbi class SomeClass @index: any @count: any def index: -> any def index=: (any) -> any def count: -> any def count=: (any) -> any end
©2018 Wantedly, Inc. BUUS@XSJUFS BUUS@BDDFTTPSͰ࡞ΒΕΔ ϝιουͷܕ͚͕ग़དྷΔ༷ʹͳͬͨʂ
©2018 Wantedly, Inc. ·ͱΊ
©2018 Wantedly, Inc. ·ͱΊ w ZBSETUFFQ͕গͣͭ͠վળʂ w 3VCZQBSTFSͷվળ w Ϧςϥϧఆͷܕ͚
w BUUS@XSJUFS BUUS@BDDFTTPSͷTVQQPSU w ͜Ε͔Βɺ3VCZͰ)BQQZ)BDLJOH͠Α͏ʂ