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
470
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
8
7.7k
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
770
実行計画から学ぶ PostgreSQL の内部動作とクエリ最適化 / Learn PostgreSQL from Explain
south37
8
39k
学びを得るための新卒 ISUCON / New Grad ISUCON for Learning
south37
4
42k
Other Decks in Programming
See All in Programming
Criando Commits Incríveis no Git
marcelgsantos
2
170
fs2-io を試してたらバグを見つけて直した話
chencmd
0
220
今からはじめるAndroidアプリ開発 2024 / DevFest 2024
star_zero
0
1k
快速入門可觀測性
blueswen
0
340
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
170
MCP with Cloudflare Workers
yusukebe
2
220
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.6k
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
300
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
180
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
310
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
690
Featured
See All Featured
How to Ace a Technical Interview
jacobian
276
23k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
The World Runs on Bad Software
bkeepers
PRO
65
11k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Code Reviewing Like a Champion
maltzj
520
39k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Fireside Chat
paigeccino
34
3.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
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͠Α͏ʂ