Code Monkey home page Code Monkey logo

Comments (6)

colin1994 avatar colin1994 commented on July 2, 2024

I'm seeing this issue as well. The timelines overlap.

from xclogparser.

abdulowork avatar abdulowork commented on July 2, 2024

I don't think Create directory is the only step that is causing the problem. The legacy build system seemed to take a single target and carry out all of its build steps, building a maximum of CPU core counts targets concurrently. However, the new build system seems to bundle all the different build steps across all targets in a task queue. These build steps are then executed in random order regardless of which target the step comes from, respecting the target dependencies.

We ended up filtering out the following subSteps from each target

CopyPlistFile
CopyStringsFile
CpHeader
CpResource
Ditto
MkDir
PBXCp
ProcessProductPackaging
RegisterExecutionPolicyException
Touch
WriteAuxiliaryFile

and recomputing the target build timestamps from the remaining subSteps but the target trace is still all over the place.

from xclogparser.

CraigSiemens avatar CraigSiemens commented on July 2, 2024

@Biboran Could you share how you went about filtering those substeps? I don't see any option in XCLogParser to apply a filter.

from xclogparser.

ecamacho avatar ecamacho commented on July 2, 2024

@CraigSiemens I'll take a look at it. Just to clarify, are you using the new build system or the legacy one? Does your project only contains Swift code or do you have Objective-C as well?

from xclogparser.

samuelsainz avatar samuelsainz commented on July 2, 2024

@ecamacho I am seeing this issue as well.

  • We use the new build system
  • We have Objective-C but most of the code (90%) is swift
  • We use CocoaPods and have more than 100 pods

For some reason when doing a clean build I am getting almost 15K different targets in the report, which makes the timeline unreadable.
This is not happening for incremental builds--in that case I can see higher level targets (one for each pod).

Looking into the targets.js file I've seen that for every Pod we get all these steps as different targets:

- CreateBuildDirectory PodName
- CreateDirectory PodName.framework
- Write PodName.hmap
- Write PodName-project-headers.hmap
- Write PodName-own-target-headers.hmap
- Write PodName-all-target-headers.hmap
- Write PodName-generated-files.hmap
- Write PodName-all-non-framework-target-headers.hmap
- Process PodName-Info.plist
- Copy PodName-umbrella.h
- Write PodName.SwiftFileList (x86_64)
- Write PodName.LinkFileList (x86_64)
- Write PodName-OutputFileMap.json (x86_64)
- Write PodName_vers.c 
- Copy PodName.swiftsourceinfo (x86_64)
- Copy PodName.swiftsourceinfo (x86_64) 
- Copy PodName.swiftmodule (x86_64)
- Copy PodName.swiftmodule (x86_64)
- Copy PodName.swiftdoc (x86_64) 
- Copy PodName-Swift.h (x86_64)
- Compile PodName_vers.c (x86_64)
- Compile PodName-dummy.m (x86_64)
- Create static library PodName (x86_64)
- Sign PodName.framework
- Touch PodName.framework

Am I doing something wrong when generating the report?
Do you know if there is a way I can aggregate all those targets into one higher level target?

from xclogparser.

CraigSiemens avatar CraigSiemens commented on July 2, 2024
  • New build system
  • It's all swift

I tried looking at the dump output (I don't really know wha I'm looking for) but it seems like it's these two subsections that are added for every target at the very start of the build.

      {
        "sectionType" : 2,
        "unknown" : 0,
        "timeStartedRecording" : 666294631.747679,
        "subtitle" : "",
        "timeStoppedRecording" : 666294631.748016,
        "messages" : [

        ],
        "wasFetchedFromCache" : false,
        "title" : "Create directory Headers",
        "domainType" : "com.apple.dt.IDE.BuildLogSection",
        "signature" : "MkDir \/Users\/neo\/Library\/Developer\/Xcode\/DerivedData\/Neo-hiuevzrflvndutcilgcszphwztqy\/Build\/Products\/Local-iphonesimulator\/NeoCore.framework\/Headers (in target 'NeoCore' from project 'Neo')",
        "isQuiet" : false,
        "text" : "",
        "subSections" : [

        ],
        "location" : {
          "documentURLString" : "",
          "timestamp" : 0
        },
        "commandDetailDesc" : "MkDir \/Users\/neo\/Library\/Developer\/Xcode\/DerivedData\/Neo-hiuevzrflvndutcilgcszphwztqy\/Build\/Products\/Local-iphonesimulator\/NeoCore.framework\/Headers (in target 'NeoCore' from project 'Neo')\r    cd \/Users\/neo\/Developer\/neo\/neo-ios\r    \/bin\/mkdir -p \/Users\/neo\/Library\/Developer\/Xcode\/DerivedData\/Neo-hiuevzrflvndutcilgcszphwztqy\/Build\/Products\/Local-iphonesimulator\/NeoCore.framework\/Headers\r",
        "uniqueIdentifier" : "77041C0A-AAC2-42BA-A34D-95B34A15CFC4",
        "wasCancelled" : false,
        "localizedResultString" : "",
        "xcbuildSignature" : "3835653266323330343763323965316534363365646133363130306639653238"
      },
      {
        "sectionType" : 2,
        "unknown" : 0,
        "timeStartedRecording" : 666294631.74784195,
        "subtitle" : "",
        "timeStoppedRecording" : 666294631.74799395,
        "messages" : [

        ],
        "wasFetchedFromCache" : false,
        "title" : "Create directory NeoCore.framework",
        "domainType" : "com.apple.dt.IDE.BuildLogSection",
        "signature" : "MkDir \/Users\/neo\/Library\/Developer\/Xcode\/DerivedData\/Neo-hiuevzrflvndutcilgcszphwztqy\/Build\/Products\/Local-iphonesimulator\/NeoCore.framework (in target 'NeoCore' from project 'Neo')",
        "isQuiet" : false,
        "text" : "",
        "subSections" : [

        ],
        "location" : {
          "documentURLString" : "",
          "timestamp" : 0
        },
        "commandDetailDesc" : "MkDir \/Users\/neo\/Library\/Developer\/Xcode\/DerivedData\/Neo-hiuevzrflvndutcilgcszphwztqy\/Build\/Products\/Local-iphonesimulator\/NeoCore.framework (in target 'NeoCore' from project 'Neo')\r    cd \/Users\/neo\/Developer\/neo\/neo-ios\r    \/bin\/mkdir -p \/Users\/neo\/Library\/Developer\/Xcode\/DerivedData\/Neo-hiuevzrflvndutcilgcszphwztqy\/Build\/Products\/Local-iphonesimulator\/NeoCore.framework\r",
        "uniqueIdentifier" : "83AE19FF-8766-4ED0-9A98-C7F692321462",
        "wasCancelled" : false,
        "localizedResultString" : "",
        "xcbuildSignature" : "3432353337613638613139663638303161343032646437393136623862346138"
      },

from xclogparser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.