Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Xcode previews and llvm Vol.2

Xcode previews and llvm Vol.2

Akio Itaya

April 17, 2020
Tweet

More Decks by Akio Itaya

Other Decks in Programming

Transcript

  1. AKKEY / AKIO ITAYA
    LLVM ͷυΩϡϝϯτಡΉӋ໨ʹͳͬͨ࿩
    MatchingAgent, Inc.
    SwiftUI ಋೖͰ
    ଓฤ

    View full-size slide

  2. ໊લɿ൘୩ ߊྑɹ/ɹ͖͋ͬʔ
    झຯɿυϥΠϒ
    ׆ಈɿ@AkkeyLab
    Cyberagent, Inc.
    MatchingAgent, Inc.
    େֶೖֶޙϓϩάϥϛϯάʹҰ໨ࠍΕɺ18೥৽ଔ iOS ΤϯδχΞ
    ࣗݾ঺հ

    View full-size slide

  3. ৼΓฦΓ
    Code Instrumentationʢinstrʣ ͕༗ޮͰɺ
    Static Framework Λ Link ͢Δͱ͖ɺ

    Linker ʹରͯ͠ instr Λ༗ޮʹ͢ΔΑ͏ʹࢦఆ͠ͳ͚Ε͹ͳΒͳ͍
    ͱ͍͏ݱ৅͕ SwiftUI ͷ XcodePreviews ಈ࡞࣌ʹൃੜ͢Δ

    View full-size slide

  4. ·ͣɺగਖ਼Օॴ

    View full-size slide

  5. గਖ਼
    ਌੾৺͸૿ͨ͠΋ͷͷɺ FirebaseCore ͕ݟ౰ͨΒͳ͍ͱݴΘΕΔ
    ΧόϨοδϥΠϯλΠϜϥΠϒϥϦ͕ݺͼग़ͤͳ͍ͱݴΘΕΔ

    View full-size slide

  6. ཧ૝ͷॲཧखॱ

    View full-size slide

  7. App
    ཧ૝ਤ

    View full-size slide

  8. ܭଌɾ਍அॲཧ
    App
    ཧ૝ਤ
    instrumented code
    swiftc -fprofile-instr-generate

    View full-size slide

  9. Code
    Coverage
    Runtime
    Library
    ܭଌɾ਍அॲཧ
    App
    ཧ૝ਤ
    instrumented code env
    swiftc -fprofile-instr-generate

    View full-size slide

  10. Code
    Coverage
    Runtime
    Library
    ܭଌɾ਍அॲཧ
    App
    ཧ૝ਤ
    instrumented code env
    linker -fprofile-instr-generate
    swiftc -fprofile-instr-generate

    View full-size slide

  11. Code
    Coverage
    Runtime
    Library
    ܭଌɾ਍அॲཧ
    App
    ݱ࣮ਤ
    instrumented code env
    linker
    swiftc -fprofile-instr-generate

    View full-size slide

  12. Code
    Coverage
    Runtime
    Library
    ܭଌɾ਍அॲཧ
    App
    ݱ࣮ਤ
    instrumented code env
    linker
    swiftc -fprofile-instr-generate

    -fprofile-instr-generate ͕దԠ͞Ε͍ͯͳ͍

    View full-size slide

  13. Code
    Coverage
    Runtime
    Library
    ܭଌɾ਍அॲཧ
    App
    ݱ࣮ਤ
    instrumented code env
    linker
    swiftc -fprofile-instr-generate

    -fprofile-instr-generate ͕దԠ͞Ε͍ͯͳ͍
    ͜ͷݱ৅͕ XcodePreviews ༻ͷϏϧυ࣌ʹൃੜ͢Δ

    View full-size slide

  14. Xcode Bug
    ※ ͓ͦΒ͘

    View full-size slide

  15. ֶͼ
    ɾͦ΋ͦ΋ΧόϨοδͷৗ࣌༗ޮ͸ΑΖ͘͠ͳ͍
    ɾCI ͰΧόϨοδΛऔಘ͢Δͱ͖ͷΈ༗ޮʹ͢Δ
    ࠓճͷ໰୊ʹରͯ͠ΞυόΠε͍͍ͯͨͩͨ͠օ͞Μɺ
    ͋Γ͕ͱ͏͍͟͝·͢ʂ

    View full-size slide

  16. Thank you !!

    View full-size slide