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
たのしいparse.y
ydah
3
120
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
良いユニットテストを書こう
mototakatsu
8
2.7k
Recoilを剥がしている話
kirik
5
6.8k
return文におけるstd::moveについて
onihusube
1
1.1k
MCP with Cloudflare Workers
yusukebe
2
220
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
290
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
テストコード書いてみませんか?
onopon
2
130
創造的活動から切り拓く新たなキャリア 好きから始めてみる夜勤オペレーターからSREへの転身
yjszk
1
130
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
490
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
45
7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
How to train your dragon (web standard)
notwaldorf
88
5.7k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
What's in a price? How to price your products and services
michaelherold
243
12k
For a Future-Friendly Web
brad_frost
175
9.4k
Facilitating Awesome Meetings
lara
50
6.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
A Tale of Four Properties
chriscoyier
157
23k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Navigating Team Friction
lara
183
15k
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͠Α͏ʂ