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
450
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.6k
理想的なマイクロサービスアーキテクチャを目指す継続的改善 / Re-architecturing of Microservices #CNDT2019
south37
10
14k
gcpc: Google Cloud Pub/Sub Client for Ruby #tqrk13
south37
1
750
実行計画から学ぶ PostgreSQL の内部動作とクエリ最適化 / Learn PostgreSQL from Explain
south37
8
38k
学びを得るための新卒 ISUCON / New Grad ISUCON for Learning
south37
4
41k
Other Decks in Programming
See All in Programming
Honoの来た道とこれから
yusukebe
19
3k
組織に自動テストを書く文化を根付かせる戦略(2024秋版) / Building Automated Test Culture 2024 Autumn Edition
twada
PRO
10
4.3k
2万ページのSSG運用における工夫と注意点 / Vue Fes Japan 2024
chinen
3
1.3k
讓數據說話:用 Python、Prometheus 和 Grafana 講故事
eddie
0
320
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
0
210
Vue3の一歩踏み込んだパフォーマンスチューニング2024
hal_spidernight
3
2.9k
のびしろを広げる巻き込まれ力:偶然を活かすキャリアの作り方/oso2024
takahashiikki
1
350
[PyCon Korea 2024 Keynote] 커뮤니티와 파이썬, 그리고 우리
beomi
0
110
現場で役立つモデリング 超入門
masuda220
PRO
12
2.6k
ECSのサービス間通信 4つの方法を比較する 〜Canary,Blue/Greenも添えて〜
tkikuc
10
2.2k
Workflow automationによるインシデント原因調査の自動化
showwin
1
120
Vue.js学習の振り返り
hiro_xre
2
130
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
519
39k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
46
2.1k
How to Think Like a Performance Engineer
csswizardry
19
1.1k
Git: the NoSQL Database
bkeepers
PRO
425
64k
The Art of Programming - Codeland 2020
erikaheidi
51
13k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
A designer walks into a library…
pauljervisheath
202
24k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Automating Front-end Workflow
addyosmani
1365
200k
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͠Α͏ʂ