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.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
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
Contemporary Test Cases
maaretp
0
140
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
690
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
300
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
Macとオーディオ再生 2024/11/02
yusukeito
0
370
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
110
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
Jakarta EE meets AI
ivargrimstad
0
220
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
430
Building Applications with DynamoDB
mza
90
6.1k
Documentation Writing (for coders)
carmenintech
65
4.4k
How STYLIGHT went responsive
nonsquared
95
5.2k
Become a Pro
speakerdeck
PRO
25
5k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Happy Clients
brianwarren
98
6.7k
The Cult of Friendly URLs
andyhume
78
6k
Music & Morning Musume
bryan
46
6.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
The Language of Interfaces
destraynor
154
24k
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͠Α͏ʂ