Contributing to XcodeGen

Contributing to XcodeGen

1405a601755e5fcbfdc93a2560368bb1?s=128

freddi(Yuki Aki)

July 11, 2020
Tweet

Transcript

  1. Contributing to XcodeGen (and its good points!) freddi (@_ _

    _ freddi _ _ _) at potatotips #70 (10th July, 2020)
  2. XcodeGen

  3. XcodeGen - YAML͔JSONͰXcode ProjectΛ؅ཧͰ͖ΔΑ͏ʹ͢Δ - Xcode Project͸؅ཧ͠ʹ͍͘ΦϦδφϧͷϑΥʔϚοτ - gitͰConflict͕ى͜Δͱ͔ͳΓ஍ࠈ -

    ͳͷͰɺ΋ͬͱ͔ΜͨΜͳYAMLͳͲͰ؅ཧͰ͖ΔΑ͏ʹ
  4. Original Format of Xcode Project // !$*UTF8*$! { archiveVersion =

    1; classes = { }; objectVersion = 52; objects = { /* Begin PBXBuildFile section */ 96401477240D1BE700A22301 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96401476240D1BE700A22301 /* AppDelegate.swift */; }; 96401479240D1BE700A22301 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96401478240D1BE700A22301 /* SceneDelegate.swift */; }; 9640147C240D1BE700A22301 /* XcodeGenTest.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 9640147A240D1BE700A22301 /* XcodeGenTest.xcdatamodeld */; }; 9640147E240D1BE700A22301 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9640147D240D1BE700A22301 /* ContentView.swift */; }; 96401480240D1BEA00A22301 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9640147F240D1BEA00A22301 /* Assets.xcassets */; }; 96401483240D1BEA00A22301 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96401482240D1BEA00A22301 /* Preview Assets.xcassets */; }; 96401486240D1BEA00A22301 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 96401484240D1BEA00A22301 /* LaunchScreen.storyboard */; }; 96401491240D1BEA00A22301 /* XcodeGenTestTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96401490240D1BEA00A22301 /* XcodeGenTestTests.swift */; }; 9640149C240D1BEA00A22301 /* XcodeGenTestUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9640149B240D1BEA00A22301 /* XcodeGenTestUITests.swift */; }; 96F82BF1240D50ED00C0397B /* APIKit in Frameworks */ = {isa = PBXBuildFile; productRef = 96F82BF0240D50ED00C0397B /* APIKit */; }; 96F82C15240D51C300C0397B /* MyLibrary0 in Frameworks */ = {isa = PBXBuildFile; productRef = 96F82C14240D51C300C0397B /* MyLibrary0 */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 9640148D240D1BEA00A22301 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9640146B240D1BE700A22301 /* Project object */; proxyType = 1; remoteGlobalIDString = 96401472240D1BE700A22301; remoteInfo = XcodeGenTest; }; 96401498240D1BEA00A22301 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9640146B240D1BE700A22301 /* Project object */; proxyType = 1; remoteGlobalIDString = 96401472240D1BE700A22301; remoteInfo = XcodeGenTest; };
  5. After Converting to XcodeGen name: Genned0 options: deploymentTarget: iOS: "13.2"

    localPackages: - Packages/APIKit packages: APIKit: url: https://github.com/ishkawa/APIKit from: 5.1.0 MyLibrary0: path: Packages/MyLibrary0/ targets: Genned: type: application platform: iOS sources: - path: XcodeGenTest dependencies: - package: APIKit - package: MyLibrary0
  6. Not Cool Point of XcodeGen - ࠷ॳͷYAML΁ͷΊͬͪΌ໘౗ - Xcode্ͷมߋ͕YAMLʹࣗಈతʹ͸൓ө͞Εͳ͍ -

    ޙ΄Ͳݴٴ - ·ͩҰ෦ͷػೳ͕ෆ଍͍ͯ͠Δ - etc) Local Swift Packageͷґଘ
  7. Not Cool Point of XcodeGen - ࠷ॳͷYAML΁ͷΊͬͪΌ໘౗ - Xcode্ͷมߋ͕YAMLʹࣗಈతʹ͸൓ө͞Εͳ͍ -

    ޙ΄Ͳݴٴ - ·ͩҰ෦ͷػೳ͕ෆ଍͍ͯ͠Δ - etc) Local Swift Packageͷґଘ
  8. Local Swift Packageͷґଘ - ձࣾͷϓϩδΣΫτͰLocal Swift PackageରԠඞਢͩͬͨ - Ͱ΋ Not

    Supporting ͩͬͨ (Issue - #721) - Swift Package͸Remoteͷ΋ͷ͔͠ରԠͯ͠ͳ͔ͬͨ
  9. ͳΜ΍͔Μ΍Ͱ ΍Δ͜ͱʹͳͬͨ

  10. ࡉ͔͍ܦҢ - TwitterͰ۪ஒΔ

  11. - RepoͷCollaboratorͰ͋Δgiginet͞Μ͔Βͦͦͷ͔͞ΕΔ ࡉ͔͍ܦҢ

  12. ΍ͬͯΈ͔ͬ ࡉ͔͍ܦҢ

  13. OSSߩݙͰؾΛ͚ͭΔ͜ͱ

  14. OSSߩݙͰؾΛ͚ͭΔ͜ͱTips - ޙํޓ׵ੑΛอͭ - TestΛॻ͘ - CONTRIBUTING.md ΛಡΜͰ͔ΒPRΛ࡞Δ - PRʹৄ͍͠આ໌Λॻ͘ʢඞཁͳΒϕϯνϚʔΫ΋ʣ

    - PR͸ߟ͑ͨ΄Ͳૣ͘Ϛʔδ͞Εͳ͍ͱߟ͑Δ
  15. ࠓճͷ࣮૷ϑϩʔ - Forkͯ͠branchΛ੾Δ - ίʔυॻ͘ - IssueΛݐͯΔʢࠓճ͸͢Ͱʹ͋ͬͨ΍ͭબΜͩʣ - PRΛͭͬͯ͘ɺϨϏϡʔ͞Εͯɺमਖ਼͢Δ -

    Merge!
  16. ๻ͷࠓճͷ৔߹ - TwitterͷҰ೔ޙ͘Β͍ʹ͸PR࡞੒

  17. - Approve͞Ε͚ͨͲΤοδέʔε͕NGͩͬͨͷͰमਖ਼ ๻ͷࠓճͷ৔߹

  18. - Code OwnerʹίϝϯτΛ໯͏ ๻ͷࠓճͷ৔߹

  19. - ଞͷόά΋ݟ͚ͭͨͷͰ͍ͭͰʹमਖ਼ ๻ͷࠓճͷ৔߹

  20. ͔ͦͬΒ਺೔ޙʹϚʔδ ๻ͷࠓճͷ৔߹

  21. XcodeGen΁ͷߩݙͰྑ͔ͬͨ݅ - ྲྀੴʹ஌Βͳ͍ͱଠ౛ଧͪͰ͖ͳ͍໰୊͕͋ͬͨ - Xcode ProjectͷϑΥʔϚοτʹৄ͘͠ͳͬͨ - XcodeGen΁ͷҠߦํ๏͕ΑΓৄ͘͠ͳͬͨ - OSSͷContirbuterಊʑͱ໊৐ΕΔΑ͏ʹͳͬͨ

    - ಘͨ஌͕ࣝɺXcode ProjectͷConflictղফͷTipsʹͳΔ
  22. ͨͩɺͦΕͰ΋XcodeGen΁ͷҠߦ͸… - ͕ɺProject͔ΒYAMLΛੜ੒͢ΔػೳͷPR͕͋Δ - ϚϯϞεϓϩδΣΫτͩͱ͔ͳΓ೉͍͠ - ײ৮తʹ΄΅࢖͑Δ͕ɺ׬શͳҠߦ͸೉͍͠ - https://github.com/yonaskolb/XcodeGen/pull/735 -

    Ϛʔδ͞Εͯͳ͍ͷͰ͝ར༻͸ࣗݾ੹೚Ͱ
  23. Conclusion

  24. Conclusion - XcodeGenͷLocal Swift PackageͷରԠΛͨ͠࿩ - XcodeGen͸ؾܰʹContributeͰ͖ΔΑʂ - ରԠΛ௨ͯ͡Xcode ProjectͷϑΥʔϚοτʹৄ͘͠ͳͬͨ

    - ↑ʹ͓͔͛ͰXcode ProjectͷConflictʹ߹ཧతʹઓ͑ΔΑ͏ʹ
  25. ΈΜͳ΋OSSʹContribute