Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
OSS Forward Workshop
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
giginet
PRO
May 12, 2022
Programming
1.7k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
OSS Forward Workshop
giginet
PRO
May 12, 2022
More Decks by giginet
See All by giginet
🀄️ on swiftc
giginet
PRO
0
580
15年メンテしてきたdotfilesから開発トレンドを振り返る 2011 - 2026
giginet
PRO
2
480
Claude Codeログ基盤の構築
giginet
PRO
7
4.7k
Inside of Swift Export
giginet
PRO
1
3.5k
Swiftビルド弾丸ツアー - Swift Buildが作る新しいエコシステム
giginet
PRO
0
2.9k
SwiftでMCPサーバーを作ろう!
giginet
PRO
3
480
Creating Intuitive Developer Tool in Swift
giginet
PRO
0
1.7k
Mergeable Libraryで 高速なアプリ起動を実現しよう!
giginet
PRO
2
8.5k
5分でわかるExplicitly Built Modules
giginet
PRO
2
1.9k
Other Decks in Programming
See All in Programming
FreeBSDでZabbixを動かす
kenkino
0
300
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
1.5k
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
1
150
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
190
App Intentsのビルドプロセスを支える技術
kntkymt
0
390
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
5
3.2k
Heart of Swift Concurrency
koher
0
890
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
180
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1k
すこし踏み込む CancellationToken
htkym
1
340
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
240
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
110
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1033
470k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
240
The Cult of Friendly URLs
andyhume
79
7k
How to Ace a Technical Interview
jacobian
281
24k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
Deep Space Network (abreviated)
tonyrice
0
310
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
240
sira's awesome portfolio website redesign presentation
elsirapls
0
410
How GitHub (no longer) Works
holman
316
150k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
520
Transcript
OSSίϛολʔʹͳΖ͏ʂ 5/12 ϫʔΫγϣοϓ @ Money Forward @giginet 1/51
ࣗݾհ • @giginet • Core Contributor of Carthage/fastlane/ XcodeGen etc...
• https://github.com/giginet • https://twitter.com/giginet • ؾܰʹmention͍ͯͩ͘͠͞ʂ 2/51
! త • ओʹiOSͰͷOSSͷίϛοτΛମݧΛ͢Δ • ࣮ࡍʹϚʔδ͞ΕΔΑ͏ͳPRΛૹΓɺOSSʹߩݙ͢Δ • ৺ཧతোนΛݮΒ͢ɻඞཁʹԠ͡OSSʹߩݙͰ͖ΔΑ͏ʹ͢ Δ •
MoneyForward iOSΤϯδχΞؒͷަྲྀ • ϫʔΫγϣοϓͰऔΓΜͩ՝Λݩʹަྲྀ͢Δ 3/51
⏱ λΠϜςʔϒϧ 14:00 ߨٛ 14:20~ ! OSSମݧϫʔΫγϣοϓ 17:20~ " ൃදձ
+ ࣗݾհ 18:00~ # 4/51
PR͕Ϛʔδ͞ΕΔ·Ͱ 5/51
1. ωλ୳͠ 2. ௐࠪ 3. ࣮ 4. ςετ 5. Pull
Request 6. Ϛʔδ ! 6/51
1. ωλ୳͠ • ԿΛ࣮͢Δ͔ܾΊΔ • OSSߩݙʹ͓͍ͯҰ൪͍͠ • ՝ൃݟΛͲͷΑ͏ʹ͍͔͕ͯ͘͠ॏཁ 7/51
i. ͍ͬͯͯػೳཁόάΛݟ͚ͭΔ • ৗతʹ͍ͬͯΔπʔϧOSSͷதͰෆ۩߹ཁΛൃݟ͢ Δ • ͜Μͳػೳཉ͍͠ • ͜ͷڍಈʹࠔͬͨ •
typoൃݟ • Ұ൪ྑ͍՝ൃݟํ๏͕ͩɺ͜Ε͕Ͱ͖Εۤ࿑͠ͳ͍ 8/51
ii. issueτϥοΧʔΛݟΔ • ීஈ͍ͬͯΔϥΠϒϥϦɺπʔϧɺ༗໊OSSʹ͍ͭͯ GitHub issueΛோΊͯΈΔɻͳΜͱͳ͘՝͕΄͍͠߹ʹ ͍͍ͯΔɻ • ϓϩδΣΫτʹΑͬͯॳ৺ऀܴϥϕϧ͕͍͍ͯΔ߹ •
appleͷϦϙδτϦGood First Issue ϥϕϧ͕͍͍ͯΔ ͷͰɺमߦʹ͍࣋ͬͯ͜ 9/51
iii. υΩϡϝϯτͷߩݙɺ • ίϚϯυͷϛεɺtypoɺϦϯΫΕͳͲΑ͘ݟ͚ͭΒΕΔͷ Ͱݟ͚ͭͨΒŢœŕͱͤΔ • ܰඍͳमਖ਼Ͱͳ͍ɻ 10/51
ߩݙ͍͢͠issue • Ϛʔδͷ͞Ε͢͞ • ෆ۩߹ɺΤοδέʔεͷߟྀ࿙ΕͳͲɺؒҧ͍ͬͯΔ͜ͱ͕ ໌֬ͳͷ • issue্Ͱ͕ٞਐΜͰ͓Γɺ࣮ͪͷঢ়ଶͷͷ(ϥϕϧ ͳͲ͕͍͍ͯΔέʔε) •
ޙํޓΛ่͞ͳ͍ͷɻͯ͠ͳ͍ͷ 11/51
ߩݙ͕େมͳissue • େنͳػೳՃϚʔδ·Ͱ͍͠ • ༷࣮ʹ͍ͭͯɺAuthorͱٞͯ͠ຏ͘ඞཁ͕͋Δ • దͳ༷͔ • ߟྀ࿙Εͳ͍͔ •
ίʔσΟϯάنൣʹଇ͍ͯ͠Δ͔ɾΑΓྑ͍ॻ͖ํͳ͍ ͔ 12/51
ωλ୳͕͠Ұ൪͍͠ • OSSʹߩݙ͠Α͏ͱ͍͏ϞνϕʔγϣϯΛ࡞Δͷ͕Ұ൪͍͠ • Δ͜ͱ͕໌֬ͩͬͨΓɺࣗʹͱͬͯඞཁͳΒखΛ͚͢ ͍ • ࠓճ͍͔ͭ͘खΛ͚͍͢issueΛ༧Ί୳͖ͯͨ͠ͷͰɺ͜ ͷաఔΛ͋ΔఔεΩοϓͰ͖·͢ 13/51
2. ௐࠪ 14/51
ௐࠪͷखॱ 1. ։ൃڥͷߏங 2. ࠶ݱঢ়گͷ༻ҙ 3. ݪҼͷௐࠪ • σόοΨʔͷར༻ 15/51
1. ։ൃڥͷߏங • ϦϙδτϦͷclone • Ϗϧυڥͷߏங • खݩͰ࣮ߦͰ͖ΔΑ͏ʹ͢Δ 16/51
2. ࠶ݱঢ়گͷ༻ҙ • ࠷খ࠶ݱڥΛ࡞Δ • ৽نϓϩδΣΫτ࡞ɺcloneͨ͠ґଘϥΠϒϥϦΛऔΓࠐΉ • લఏ݅ΛௐΔɺ༻ҙ͢Δ • ಛఆͷঢ়گԼͰ͕ى͖Δͱ͖ɺͦͷέʔεΛ༻ҙ͢Δ
ʢઃఆϑΝΠϧͳͲʣ • ςετέʔεͷ༻ҙ 17/51
3. ݪҼͷௐࠪ • lldb(σόοΨʔ)ɺbreakpointͳͲɺ௨ৗͷσόοάख๏Λۦ ͢Δʢޙड़ʣ 18/51
ςετίʔυͷ࣮ • ͘͢͝େࣄɻ࣮1ߦʹରͯ͠ςετഒͱ͍͏ͷβϥ • ઌʹςετέʔε͔Βॻ͍ͯྑ͍(TDD) 19/51
ྑ͍ςετ • PRͷલʹςετ͕མ͍͕ͪͯͨɺमਖ਼ʹΑͬͯΔΑ͏ͳςε τ͕ཧత • ఆ͞ΕΔΤοδέʔε͍͠ঢ়گ͕ཏ͞Ε͍ͯΔ • Α͍ςετέʔε͕͋ΔͱϨϏϡʔ͞Ε͍͢ɹ 20/51
PRΛग़͢ 21/51
Description • ʮΓ͍ͨ͜ͱʯʮલఏ݅ʯʮͲͷΑ͏ʹղܾ͔ͨ͠ʯʮͦ ͷଞݒ೦ʯ • ςϯϓϨʔτʹԊ͏ͱָ • ແݴPRආ͚Δ 22/51
## Motivation & Context <!-- Ͳ͏͍͏ঢ়گͰ͜Ε͕ى͖Δ͔ --> <!-- ͳͥ͜ͷػೳ͕ඞཁͳͷ͔ɺԿʹࠔ͍ͬͯΔ͔ -->
## Description <!-- ͲͷΑ͏ʹ࣮͔ͨ͠ --> <!-- ͲͷΑ͏ͳέʔεͰಈ࡞֬ೝ͔ͨ͠ --> <!-- Τοδέʔεͳ͍͔ --> 23/51
ϨϏϡʔ͞ΕΔ͖ͱ͜Ζ • ςετέʔεద͔ • Τοδέʔεͳ͍͔ • ঢ়گ͕ཏ͞Ε͍ͯΔʁ • ίʔσΟϯάنൣʹै͍ͬͯΔ͔ •
࣮͔ॴɺϓϩδΣΫτ͝ͱͷنଇ 24/51
Ϛʔδ 25/51
Ϛʔδ͞Ε͍͢PR • ٞͷ༨͕ͳ͍ • MotivationΛ͔ͬ͠Γͱઆ໌͍ͯ͠Δ • ςετಈ࡞֬ೝ͕໌֬ 26/51
αϯϓϧ https://github.com/yonaskolb/XcodeGen/pull/720 27/51
28/51
29/51
ਐΊํ 30/51
՝ • ࣄલʹड़ͨΑ͏ʹωλ୳͕͠ͱ͍ͯ͠ɻ༧Ίணख͢͠ ͍՝Λ͍͔ͭ͘༻ҙͯ͠Έ·ͨ͠ • https://hackmd.io/@giginet/BJQulUAr5 • ͜͜ʹͳ͍issueͪΖΜܴ • ݸਓతʹ๊͍͑ͯΔ՝ײɺڵຯͷ͋ΔOSSͷௐܴࠪ
31/51
ਐΊํ • ωλாΛݟͯɺSlackͰઓ͍ͨ͠issueΛڭ͍͑ͯͩ͘͞ • 1ਓͰྑ͍͠ɺ՝͕ඃͬͨΒదٓνʔϜΛΜͰΑ͍Ͱ ͢ɻϞϒϓϩɺϖΞϓϩܴ 32/51
! ϝϯλʔ • ͷखआΓ์ɻͲΜͲΜฉ͍͍ͯͩ͘͞ • Ͳͷissue͍͍͔ͬͯΘ͔Βͳ͍ʂ • ڥߏஙηοτΞοϓͰ͖ͳ͍ʂ(खݩͰͷ࣮ߦɺσόο Ψʔ) •
࣮ํ๏Θ͔Βͳ͍ʂ • ςετॻ͚ͳ͍ʂ 33/51
() ڥߏங σόοάςΫχοΫ 34/51
iOSϥΠϒϥϦͷςετ • 1. ςετ༻ͷiOSϓϩδΣΫτΛ࡞Δ • 2. Ϋϩʔϯͨ͠ϩʔΧϧϦϙδτϦΛΞϓϦʹΈࠐΉ • SwiftPM •
CocoaPods 35/51
SwiftPM Package Dependencies > + > Add Local Ͱcloneͨ͠σΟϨΫτ ϦΛࢦఆ
36/51
CocoaPods $ git clone https://github.com/ReactiveX/RxSwift.git /path/to/repos/RxSwift pod 'RxSwift', path: '/path/to/repos/RxSwift'
37/51
CLIπʔϧͷςετ(ྫ: XcodeGen) ShellͰͷ࣮ߦɺςετ $ git clone https://github.com/yonaskolb/XcodeGen.git $ cd XcodeGen
$ swift build $ swift test $ swift run xcodegen --help 38/51
• ͘͠XcodeͰϏϧυͨ͠όΠφϦΛShell͔Β࣮ߦͯ͠ྑ ͍ • Products > Show Build Folder in
FinderͰόΠφϦͷҐஔ͕ Θ͔Δ 39/51
XcodeͰσόοΨʔʹଓ͢Δ 1. Debug > Attach to Process by ID ͰίϚϯυ໊ΛೖΕΔ
2. Edit Scheme > Arguments Passed on Launch 3. Run 40/51
41/51
XcodeͷRunϘλϯ͔ΒҾΛ͢ XcodeͰͷ࣮ߦ࣌ʹίϚϯυϥΠϯҾΛ͢͜ͱͰ͖Δɻ࠷ ॳ͔ΒσόοΨʔ͕ܨ͕Γ։ൃ͍͢͠ • xcodegen > Edit Scheme > Arguments
Passed On Launch. 42/51
43/51
ShellΛͬͨςετڥͷ࡞Γํ(ྫ: swift- argument-parser) 44/51
։ൃ͍ͨ͠ύοέʔδΛclone $ git clone https://github.com/apple/swift-argument-parser.git 45/51
։ൃ༻ϓϩδΣΫτͷ࡞ $ mkdir oss-forward-workshop $ cd oss-forward-workshop $ swift package
init 46/51
ϓϩδΣΫτΛXcodeͰ։͘ Xcode > Open͔Β oss-forward-workshop Λ։͘ 47/51
Package.swift • cloneͨ͠ϩʔΧϧύεΛ Package.swift ʹهड़ • ςετ༻ͷexecutableΛՃ // swift-tools-version: 5.6
// The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "oss-forward-workshop", products: [ .executable(name: "oss-forward-workshop", targets: ["oss-forward-workshop"]) ], dependencies: [ .package(name: "swift-argument-parser", path: "/path/to/repo/swift-argument-parser"), ], targets: [ .target(name: "oss-forward-workshop", dependencies: [ .product(name: "ArgumentParser", package: "swift-argument-parser"), ]) ] ) 48/51
Package.swift • cloneͨ͠ϩʔΧϧύεΛ Package.swift ʹهड़ • ςετ༻ͷexecutableΛՃ // swift-tools-version: 5.6
// The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "oss-forward-workshop", products: [ .executable(name: "oss-forward-workshop", targets: ["oss-forward-workshop"]) ], dependencies: [ .package(name: "swift-argument-parser", path: "/path/to/repo/swift-argument-parser"), ], targets: [ .target(name: "oss-forward-workshop", dependencies: [ .product(name: "ArgumentParser", package: "swift-argument-parser"), ]) ] ) 48/51
oss-forward-workshop/main.swift import ArgumentParser struct MyCommand: ParsableCommand { static var configuration
= CommandConfiguration( commandName: "my-command", abstract: "My first command", discussion: "Hello", version: "1.0.0", shouldDisplay: true, helpNames: [.long, .short] ) func run() throws { print("Hello, World!") } } MyCommand.main() 49/51
$ swift run oss-forward-workshop --help OVERVIEW: My first command Hello
USAGE: my-command OPTIONS: --version Show the version. -h, --help Show help information. 50/51
ͦͷଞ • ྺ࢙ͷ͋Δπʔϧ (fastlane/CocoaPods/danger/xcprettyͳͲ) RubyͰॻ͔Ε͍ͯΔ͜ͱ͕ଟ͘ɺRuby։ൃͷσόοάख๏͕ ʹཱͭ • pry, rspec, rubygems
• ઓ͢Δํฉ͍͍ͯͩ͘͞ 51/51