Code Monkey home page Code Monkey logo

Comments (7)

Parabak avatar Parabak commented on June 23, 2024

+1

from xclogparser.

seyfeddin avatar seyfeddin commented on June 23, 2024

+1

from xclogparser.

BalestraPatrick avatar BalestraPatrick commented on June 23, 2024

Hello, unfortunately I don't have time to debug exactly what's wrong, but it must be one of the recently added contributions between the last two versions: v0.2.36...v0.2.37

I have a feeling it must be one of these 3 changes:

If you can locally try to revert each of those commits and see which one fixes it, that would be helpful.

from xclogparser.

Parabak avatar Parabak commented on June 23, 2024

I can confirm that rolling back to version 0.2.36 worked for me

from xclogparser.

bcylin avatar bcylin commented on June 23, 2024

Tested locally. Reverting #182 avoids the massive RAM usage. But the underlying issue seems to be the BuildStep struct that has too many subSteps.


With SwiftCompile as a detail type, it includes each file's compilation, such as:

SwiftCompile normal arm64 /opt/homebrew/var/agent/builds/ip-123-45-67-890-internal/project/pipeline/.../Sources/.../file.swift (in target '...' from project '...') ... etc

I tried it in a project with ~7,000 Swift files, it adds more than 400,000 sub steps into the parsed result, nested in 5 levels down.

In both use cases of --reporter json and --reporter flatJson, the struct becomes too large that JSONEncoder can't handle. The memory usage shoots up on line 42:

private func report<T: Encodable>(encodable: T, output: ReporterOutput) throws {
let encoder = JSONEncoder()
encoder.outputFormatting = .prettyPrinted
let json = try encoder.encode(encodable)
try output.write(report: json)
}

An alternative workaround is to use --reporter summaryJson as it drops all the sub steps in the SummaryJsonReporter.

from xclogparser.

BalestraPatrick avatar BalestraPatrick commented on June 23, 2024

Reverting in #199 and then will cut a new release. Thanks for reporting!

from xclogparser.

InspektorKek avatar InspektorKek commented on June 23, 2024

Same problem with JSON, but not only on last version. Actually on each version I face that issue(

Context:
MacOS: Sonoma 14.2.1
Device: MacbookPro M3 Pro
Xcode: 15.1
XCLogParser installation: rake build v 0.2.36

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.