Skip to content

Conversation

@spydercapriani
Copy link

Details

Opens up the parsing feature to more LogTypes.

Idea behind this approach is to make it easier to parse things like Package logs so as to potentially allow metric collection around dependencies. For example, Package + Build Logs can provide a deeper picture of what developement cycle looks like since package resolution happen before builds take place but aren't necessarily being accounted for.

CryptoSwift: 1.3.3 -> 1.4.2
ArgumentParser: 0.3.1 -> 1.0.3
Signed-off-by: Danny Gilbert <spydercapriani@gmail.com>
Signed-off-by: Danny Gilbert <spydercapriani@gmail.com>
Allow consumers to specify different logsDir

Signed-off-by: Danny Gilbert <spydercapriani@gmail.com>
Allow consumers to inject modified LogFinders

Signed-off-by: Danny Gilbert <spydercapriani@gmail.com>
Allow consumers to specify which logs they would like to parse. By default this will still apply to build logs.

Allows consumers to parse things like Package resolution logs.

Signed-off-by: Danny Gilbert <spydercapriani@gmail.com>
@spydercapriani
Copy link
Author

Example:
xclogparser parse --project XCLogParser --reporter json --logs Package

This will parse the latest package resolution log for the project.

Signed-off-by: Danny Gilbert <spydercapriani@gmail.com>
Return list of file URLs for log dir.

Signed-off-by: Danny Gilbert <spydercapriani@gmail.com>
Offer filtering for logs newer than specifed date

Signed-off-by: Danny Gilbert <spydercapriani@gmail.com>
Path is case sensitive for tests but not in real world use

Signed-off-by: Danny Gilbert <spydercapriani@gmail.com>
Signed-off-by: Danny Gilbert <spydercapriani@gmail.com>
Copy link
Collaborator

@PatrikBillgren PatrikBillgren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting the PR! I have a few comments and questions. I also see there are a few Swiftlint warnings

)

@Option(name: .long, help: "Type of .xactivitylog file to look for.")
var logs: LogType = .build
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:
Rename this variable to logType . (Same for ManifestCommand.swift and ParseCommand.swift)

abstract: "Dumps the xcactivitylog file into a JSON document"
)

@Option(name: .long, help: "Type of .xactivitylog file to look for.")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about printing the available option values here as well to make it easier for the user?


}

public func findLatestLogsWithLogOptions(_ logOptions: LogOptions) throws -> [URL] {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this function is not used, was it supposed to be part of a refactor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants