MobileNativeFoundation / MobileNativeFoundation/XCLogParser

Swift Compilation marked as others type

Open
#201 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
1.9k
Forks
138
PR merge metrics
No merged PRs in 30d

Description

Hi, to be honest, I'm not sure if this is a known bug or not. I figure that when XCLogParser tries to parse the swift file, it seems to compare it with the wrong prefix.

Basically CompileSwift does not exist anymore. It was replaced with SwiftCompile.

Screenshot 2024-01-18 at 15 27 48

  • Captured on Xcode 15.0.1

To reproduce:

  1. Create a project with Swift File inside it
  2. Build it
  3. Take a look on Report Navigator
  4. Export it

Try to use xclogparser, and compare it with XCLogParser results. When compiling to swift, it will categorize it as other rather than swiftCompilation.

This is json result
Screenshot 2024-01-18 at 15 37 13

I also found that CompileSwiftSources prefix does not exist anymore. It was replaced like this hunk. But please do correct me if I mistook the meaning of the swiftAggregatedCompilation.

Screenshot 2024-01-18 at 15 42 31

This is the file where XCLogParser tries to parse the steps by looking at the command prefix.
https://github.com/MobileNativeFoundation/XCLogParser/blob/e536e3009d391513a791e08b991d6fe413be0f9c/Sources/XCLogParser/parser/BuildStep.swift#L123C22-L123C41

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Sources/XCLogParser/parser/BuildStep.swift at the command-prefix matching referenced in the issue. Reproduce with an Xcode 15.0.1 project containing a Swift file, export the build report, and compare the parser result. Done means Swift compilation is categorized as swiftCompilation rather than other, including the current SwiftCompile naming.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system, devtools
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.