Git Product home page Git Product logo

xcbeautify's Introduction

Hi there πŸ‘‹

My name is Charles Pisciotta. I'm a software engineer interested in mobile development and entrepreneurship. Check out some of my experience below, and feel free to reach out!

πŸ‘¨β€πŸ’» Software Development Work Experience

πŸŽ“ Education

πŸ“« Contact Information

xcbeautify's People

Contributors

acecilia avatar allcontributors[bot] avatar brennantaylor avatar chenrui333 avatar chriszielinski avatar cpisciotta avatar cyberbeni avatar danieleformichelli avatar dependabot[bot] avatar fortmarek avatar greensky01 avatar grigorye avatar hisaac avatar kinwahlai avatar montakoleg avatar nikolaykasyanov avatar omarzl avatar paultaykalo avatar pepicrft avatar pieterclaerhout avatar pjtnt11 avatar pyrtsa avatar remyjette avatar renovate[bot] avatar swiftyfinch avatar thii avatar trupin avatar uhooi avatar yageek avatar yonaskolb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xcbeautify's Issues

Much slower than xcpretty

Hi there. Not knocking the tool or anything I really like it and want to make it better. I was trying it out on our build's output and noticed it was very very slow. Was going to open an issue now and dig into profiling it. I imagine its something simple like regex's being created more often than necessary or something similar. Below is a comparison of timing on our unittest output between xcpretty and xcbeautify.

 ~/dev > du -hs xcodebuild.log
3.0M    xcodebuild.log
 ~/dev > cat xcpretty.sh xcbeautify.sh
#!/bin/bash
cat xcodebuild.log | xcpretty > /dev/null
#!/bin/bash
cat xcodebuild.log | xcbeautify > /dev/null
 ~/dev > time ./xcpretty.sh
        1.34 real         1.18 user         0.14 sys
 ~/dev > time ./xcbeautify.sh
       52.34 real        52.23 user         0.06 sys

Maintainer wanted

This was a weekend hack a few years ago to work around the parallel testing feature in Xcode 9 not being supported by xcpretty. Even though I don't use this anymore, it seems like there are still people that depends on it. I don't have time in maintaining this project for much longer, but also don't want to break anyone's builds. If you're interested in taking it over, please contact me.

Formatting to JSON

Hey there!

First of all, this project really seems promising. I've been using XCPretty for quite a while and I would love to replace it with a more up to date framework that is also more performant.

However, before I jump on that boat, I'd like to find out whether I can get to the same results as I want. We're currently using https://github.com/marcelofabri/xcpretty-json-formatter so we can use https://github.com/f-meloni/danger-swift-xcodesummary.

Is there any way to get to the same JSON result with xcbeautify? It allows us to parse the warnings, errors, and messages, to show them in Pull Requests.

Thanks!

Provide option to only show building module

Current there're only quiet and quieter options to only show warnings and errors. However, I would like to know which module is currently building to get to know the approximate progress.

It's just like the effect in the Xcode's build log viewer, when I filtered it with All Issues or Error only, not only warnings and errors are shown, but also the modules currently building is also shown, which will disappear when build finished.

\r is something that I know to clear part of the console output. But I'm not sure whether there're better ways to achieve it.

A more detailed 'Usage guide'?

Where can i find more information on the usage of xcbeautify?

For e.g. xcodebuild [flags] | xcbeautify

  • what are the different flags that can be used here?

How to generate a JUnit report from xcbeautify?

Add an option which prints warning and error instead of the unicode character

Hi there. Thanks for this handy tool :)

I want to create a problem matcher for vscode in a custom task where i pipe the build output from xcodebuild through xcbeautify. In order to distinguish between and error and a warning i need to match the words as a string with a regex. VSCode can then present the errors and warnings in the problems tab and i can jump to them.
At the moment this is not working quite well since warning and error are printed by xcbeautify as \u{9888} and \u{26A0}. It would be nice if there were an option i can pass in and then warning and error is printed instead of the special unicode character.

Extra backslashes before spaces in run script phases names

xcbeautify prints a \ before each whitespace in the names of my "Run Script" build phases.

For example :

❯ xcodebuild build -showBuildTimingSummary -workspace Redacted.xcworkspace -scheme Redacted-Debug | xcbeautify 
[NotificationExtension] Running script Nullability\ Check
[NotificationExtension] Processing Info.plist
Signing Redacted.NotificationExtension.appex (in target: NotificationExtension)
[Pods-Redacted] Compiling Pods-Redacted-dummy.m
[Pods-Redacted] Building library libPods-Redacted.a
[ShareExtension] Processing Info.plist
Signing Redacted.ShareExtension.appex (in target: ShareExtension)
[Redacted] Running script [CP]\ Check\ Pods\ Manifest.lock
[Redacted] Running script Nullability\ Check
[Redacted] Running script Error\ codes\ check
[Redacted] Running script Linters
[Redacted] Compiling ISConsultationViewController.m
[Redacted] Compiling ISNewDocumentViewController.m
[Redacted] Linking Redacted-Debug
[Redacted] Compiling Consultation.storyboard
[Redacted] Processing Info.plist
[Redacted] Copying Redacted.ShareExtension.appex
[Redacted] Copying Redacted.NotificationExtension.appex
[Redacted] Running script [CP]\ Embed\ Pods\ Frameworks
[Redacted] Running script [CP]\ Copy\ Pods\ Resources
[Redacted] Running script Validate\ Payment\ Pickers\ XML
Signing Redacted-Debug.app (in target: Redacted)
Signing (3 tasks) | 24.000 seconds
Build Succeeded

I can probably look at this when I have more time and submit a PR.

Tests in parallel don't output junit results

 xcodebuild test -project "MyApp.xcodeproj" -scheme "MyApp" -sdk iphonesimulator -destination "OS=16.0,name=iPhone 13 mini,platform=iOS Simulator" -derivedDataPath "~/temp2" -destination-timeout 300 -parallel-testing-worker-count 4 -parallel-testing-enabled YES |  ~/.mint/bin/xcbeautify --is-ci --quiet --report junit --junit-report-filename junitresult.xml --report-path . 

The resulting file junitresult.xml shows 0 tests run :(

Print which files are compiled

Hi,

xcbeautify works really great but i would like to see which files are actually compiled like xcpretty did.
The default option shows only which targets are build + warnings and errors. -q and -qq show even less.
An extra verbose mode in between which also shows the compiled files would be great.

LinkStoryboards errors not shown

Problem

Errors in Storyboards are swallowed by xcbeautify. (I am use with Xcode12.4). For example: error: Did not find view controller with identifier "AccountPoint" in Home.storyboard, referenced from Dashboard.storyboard

Log

I paste a part of my log (the 4th line is super long)

LinkStoryboards (in target 'MyBankIphone' from project 'MyBankIphone')
    cd /Path/to/Project/apps/thebank/iphone/native
    export XCODE_DEVELOPER_USR_PATH\=/Applications/Xcode12.4.app/Contents/Developer/usr/bin/..
    /Applications/Xcode12.4.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --module TheBank --target-device iphone --minimum-deployment-target 11.0 --output-format human-readable-text --link /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Products/Debug-iphonesimulator/TheBank.app /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Intermediates.noindex/MyBankIphone.build/Debug-iphonesimulator/MyBankIphone.build/TransferBranchSelect.storyboardc /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Intermediates.noindex/MyBankIphone.build/Debug-iphonesimulator/MyBankIphone.build/Debit.storyboardc /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Intermediates.noindex/MyBankIphone.build/Debug-iphonesimulator/MyBankIphone.build/ApplePayPromotion.storyboardc /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Intermediates.noindex/MyBankIphone.build/Debug-iphonesimulator/MyBankIphone.build/LoginOTPW.storyboardc /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Intermediates.noindex/MyBankIphone.build/Debug-iphonesimulator/MyBankIphone.build/Login.storyboardc /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Intermediates.noindex/MyBankIphone.build/Debug-iphonesimulator/MyBankIphone.build/EULA.storyboardc /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Intermediates.noindex/MyBankIphone.build/Debug-iphonesimulator/MyBankIphone.build/QuickSetting.storyboardc /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Intermediates.noindex/MyBankIphone.build/Debug-iphonesimulator/MyBankIphone.build/LoginSetting.storyboardc /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Intermediates.noindex/MyBankIphone.build/Debug-iphonesimulator/MyBankIphone.build/Main.storyboardc /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Intermediates.noindex/MyBankIphone.build/Debug-iphonesimulator/MyBankIphone.build/Dashboard.storyboardc /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Intermediates.noindex/MyBankIphone.build/Debug-iphonesimulator/MyBankIphone.build/Home.storyboardc /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Intermediates.noindex/MyBankIphone.build/Debug-iphonesimulator/MyBankIphone.build/TransferAndTrade.storyboardc /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Intermediates.noindex/MyBankIphone.build/Debug-iphonesimulator/MyBankIphone.build/TransferLimitPop.storyboardc /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Intermediates.noindex/MyBankIphone.build/Debug-iphonesimulator/MyBankIphone.build/NewCredit.storyboardc /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Intermediates.noindex/MyBankIphone.build/Debug-iphonesimulator/MyBankIphone.build/TransferDateSelect.storyboardc /Path/to/DerivedData/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/MyBankIphone-ekalchahdgkmpvgslorsudbagmck/Build/Intermediates.noindex/MyBankIphone.build/Debug-iphonesimulator/MyBankIphone.build/Web30CardDetail.storyboardc
/* com.apple.ibtool.errors */
: error: Did not find view controller with identifier "AccountPoint" in Home.storyboard, referenced from Dashboard.storyboard
Command LinkStoryboards failed with a nonzero exit code

How to create an error like this?

In case someone is interested on how to re-create this error on an Xcode project just create a Storyboard segue in that points to another Storyboard. Then delete the target view controller but do not delete the reference in the segue.

Screen Shot 2021-10-21 at 21 43 39

Emacs cannot go to error

I am writing a package for compiling and running apps using Emacs and I pipe the output from xcodebuild to xcbeautify but Emacs wont recognize the errors when this tool adds warning/info and error emojis. Is it possible to disable them somehow for just when an error occurs?

xcbeautify hangs virtual machine on bitrise.io

Hello!

I am sorry I can't provide many more debug details.
We are using bitrise with fastlane and xcbeautify to run our iOS builds.

all of our builds had extreme High CPU usage, and UI tests were getting completely stuck.

We checked the Bitrise VMs with a VNC and by checking the activity monitor we realized the cause of the freeze was the
xcbeautify consuming all resources.

This is not causing a hang on our local machine, it's more tied to a VM environment.

Do you have any performance issue report regarding similar issues?
or any way we can enable some performance logs/monitoring for improving this report?
thanks

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.


Warning

Renovate failed to look up the following dependencies: Could not determine new digest for update (github-releases package bazelbuild/rules_swift).

Files affected: WORKSPACE


Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

bazel
WORKSPACE
  • build_bazel_rules_swift 410d8ed546e3e43dd06f01cb3916ede6632a6d71
  • Colorizer 0.2.1
  • ArgumentParser 1.3.0
github-actions
.github/workflows/release.yml
  • actions/create-release v1
  • battila7/get-version-action v2
  • actions/checkout v4
  • swift-actions/setup-swift v1
  • actions/upload-release-asset v1.0.2
  • actions/upload-release-asset v1.0.2
  • actions/upload-release-asset v1.0.2
  • actions/checkout v4
  • swift-actions/setup-swift v1
  • actions/upload-release-asset v1.0.2
.github/workflows/stale.yml
  • actions/stale v9
.github/workflows/style.yml
  • actions/checkout v4
.github/workflows/xcbeautify.yml
  • swift-actions/setup-swift 61a116f4030ac34fb5731aab0eff5a0aed94ba29
  • actions/checkout v4
  • swift-actions/setup-swift 61a116f4030ac34fb5731aab0eff5a0aed94ba29
  • actions/checkout v4
homebrew
Formula/xcbeautify.rb
ruby-version
.ruby-version
  • ruby 3.2.2
swift
Package.swift
  • apple/swift-argument-parser from: "1.3.0"
  • getGuaka/Colorizer from: "0.2.1"
  • MaxDesiatov/XMLCoder from: "0.17.1"

  • Check this box to trigger a request for Renovate to run again on this repository

main thread dead lock

    NSArray *lines  = [log componentsSeparatedByString:@"\n"];
    Parser *parser = [[Parser alloc] init];
    for (NSString *line in lines) {
        NSString *beautyLog = [parser parseWithLine:line colored:NO];
        if (beautyLog.length) {
            DDLogInfo(@"%@", beautyLog);
        }
    }
ibsystem_kernel.dylib         0x7fff6c5b4afe read$NOCANCEL + 10
libsystem_c.dylib              0x7fff6c500b25 __srefill1 + 24
libsystem_c.dylib              0x7fff6c4fd017 getdelim + 251
libswiftCore.dylib             0x7fff6bc18903 swift_stdlib_readLine_stdin + 35
libswiftCore.dylib             0x7fff6b9a9465 $ss8readLine16strippingNewlineSSSgSb_tF + 37
OCObfuscator                   0x10004497a $sSS12OCObfuscatorE8beautify7pattern7coloredSSSgAA7PatternO_SbtF + 7242
OCObfuscator                   0x1000396d2 $s12OCObfuscator6ParserC5parse4line7coloredSSSgSS_SbtF + 1826
OCObfuscator                   0x10003ae9c $s12OCObfuscator6ParserC5parse4line7coloredSSSgSS_SbtFTo + 92
OCObfuscator                   0x10000b2cd -[ObfuscatorTool receivedData:] + 1101
CoreFoundation                 0x7fff34d9a35f __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
CoreFoundation                 0x7fff34d9a2f3 ___CFXRegistrationPost1_block_invoke + 63
CoreFoundation                 0x7fff34d9a268 _CFXRegistrationPost1 + 372
CoreFoundation                 0x7fff34d99ebe ___CFXNotificationPost_block_invoke + 97
CoreFoundation                 0x7fff34d697e2 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1575
CoreFoundation                 0x7fff34d68c82 _CFXNotificationPost + 1351
Foundation                     0x7fff373eea22 -[NSNotificationCenter postNotificationName:object:userInfo:] + 59
Foundation                     0x7fff375271f3 _performFileHandleSource + 1106
CoreFoundation                 0x7fff34da4b21 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
CoreFoundation                 0x7fff34da4ac0 __CFRunLoopDoSource0 + 103
CoreFoundation                 0x7fff34da48d4 __CFRunLoopDoSources0 + 209
CoreFoundation                 0x7fff34da3740 __CFRunLoopRun + 1272
CoreFoundation                 0x7fff34da2bd3 CFRunLoopRunSpecific + 499
HIToolbox                      0x7fff338f865d RunCurrentEventLoopInMode + 292
HIToolbox                      0x7fff338f82a9 ReceiveNextEventCommon + 356
HIToolbox                      0x7fff338f8127 _BlockUntilNextEventMatchingListInModeWithFilter + 64
AppKit                         0x7fff31f68ba4 _DPSNextEvent + 990
AppKit                         0x7fff31f67380 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
AppKit                         0x7fff31f5909e -[NSApplication run] + 658
AppKit                         0x7fff31f2b465 NSApplicationMain + 777
OCObfuscator                   0x100017e1f main + 47
libdyld.dylib                  0x7fff6c4727fd start + 1

then i get the dead lock code

    private func formatCompileWarning(pattern: Pattern) -> String? {
        let groups = capturedGroups(with: pattern)
        let filePath = groups[0]
        let reason = groups[2]

        // Read 2 additional lines to get the warning line and cursor position
        let line: String = readLine() ?? "" // ===>this is the dead lock !!!!!!!!!!!!!
        let cursor: String = readLine() ?? ""
        ....
       .....
}

Multiline error message is cut out from the output

When an error message is multiline, like this:

/redacted/path/to/file.swift:31: error: -[redacted.package.testfile testRedactedName] : failed: caught error: "code: 1, Error: code: 1, FAILURE: Build failed with an exception.

* What went wrong:
Some problems were found with the
multiple lines here
BUILD FAILED in 1s"

then xcbeautify output only displays:

Redacted
    βœ– testRedactedName, failed: caught error: "code: 1, Error: code: 1, FAILURE: Build failed with an exception.

Command line option to output issue only

Is it possible to add a command line options to display warnings or errors only? Because for a huge project, most of output "[XXX] Compiling YYY.cpp" are of less importance and they would hide real issues.

Would you accept a PR adding junit test report generation?

Hi πŸ‘‹

Would you accept a PR adding junit test report generation?

Context:

  • When using bazel, trainer cant be used to read the xcode plists
  • When using bazel, XCTestHTMLReport cant be used to read the xcresult under some scenarios

So the only thing available seems to be the test log. If the output of xcbeautify is reliable enough, generating a junit report from it may be a good alternative

Support NO_COLOR env var

https://no-color.org/

"All command-line software which outputs text with ANSI color added should check for the presence of a NO_COLOR environment variable that, when present (regardless of its value), prevents the addition of ANSI color."

ProcessPCH and ProcessPCH++ patterns are too strict

Not all precompile headers necessarily end in the .pch suffix.

For example, precompiled headers generated by CMake are of the form cmake_pch.h|xx (https://cmake.org/cmake/help/latest/command/target_precompile_headers.html)

For a pure ObjC CMake target, the generated PCH could also be cmake_pch.objc.h

This causes the ProcessPCH line to get swallowed, which is unfortunate especially for projects with large precompiled headers that take a while to compile

Got Fatal Error while building a project

Fatal error: ["build/CocoaLumberjack.framework"]: file /Users/admin/dev/xcbeautify/Sources/XcbeautifyLib/String+Beautify.swift, line 164

I can provide you with more info if required

No output with XCode 11.1

Hi there,

I upgraded the XCode 11.1, Unfortunately, there is no output for each file building status.

Thanks

How to pipe an already existing xcodebuild log?

πŸ‘‹
This may be a bit of a dumb question, but I cannot figure it out: how to pipe an already existing xcodebuild log to xcbeautify?

I tried this:

cat xcodebuild.log | xcbeautify

But it does not work, returns nothing

Optionally support emitting errors and test failures using Github Actions reporter format (like SwiftLint)

We run our Xcode builds on GitHub actions and use xcbeautify to make the logs better. However if a test fails or there is a compile error we have to dig through the logs to find the issue. It is possible for tools to emit log messages in a format that Github Actions can interpret.

See https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#logging-commands

SwiftLint has a --reporter option that causes it to emit issues in this format (https://github.com/realm/SwiftLint/blob/master/Source/SwiftLintFramework/Reporters/GitHubActionsLoggingReporter.swift) this makes running SwiftLint in Github Actions work really well.

It would are great it xcbeautify also had the option of reporting errors like this.

publish release 0.16.0 to cocoapods

Looks like JUnit support for parallel testing was added in 0.16.0, but it was not published to cocoapods. The latest version available there is 0.15.0, any chance it could be published?

Thanks!

Parallel tests are not matched

I've been trying xcbeautify out with a parallel test suite, but the tests are not being matched. Below is some of the unparsed output from xcodebuild. Might be worth noting that the test suite is written in Objective-C, but I doubt it makes a difference.

Testing started on 'My Mac'
Test suite 'MyControllerTests' started on 'xctest (49438)'
Test suite 'MyTests' started on 'xctest (49440)'
Test case '-[MyControllerTests testErrorReported]' passed on 'xctest (49438)' (0.301 seconds)
Test case '-[MyControllerTests testTheThingIsChanged]' passed on 'xctest (49438)' (0.005 seconds)
Test case '-[MyControllerTests testAllTheThings]' passed on 'xctest (49438)' (0.001 seconds)
Test suite 'MyServiceTests' started on 'xctest (49438)'
Test case '-[MyServiceTests testServiceActuallyWorks]' passed on 'xctest (49438)' (0.004 seconds)

The regex pattern matching the passed tests doesn't expect the on 'xctest (49438)' part and there is no arbitrary character at the end of the line. Does it make sense to simply ignore the process part and make the arbitrary character optional? Personally I don't care about the process ID of the test, but happy to discuss that.

I'm also happy to put in a PR for this. Seems fair because I'd like to see this fixed πŸ™‚

Simulator failures not captured

If the simulator fails for whatever reason then the output isn't captured. Here's a sample (test names and classes replaced with snipped):

Test Case '-[snipped]' passed (0.416 seconds).
Test Suite 'snipped' passed at 2020-09-30 03:49:19.794.
	 Executed 1 test, with 0 failures (0 unexpected) in 0.416 (0.418) seconds
Test Suite 'snipped.xctest' passed at 2020-09-30 03:49:19.796.
	 Executed 1 test, with 0 failures (0 unexpected) in 0.416 (0.421) seconds
Test Suite 'All tests' passed at 2020-09-30 03:49:19.797.
	 Executed 1 test, with 0 failures (0 unexpected) in 0.416 (0.423) seconds
2020-09-30 03:49:23.416 xcodebuild[13914:99691] [MT] IDETestOperationsObserverDebug: 335.611 elapsed -- Testing started completed.
2020-09-30 03:49:23.416 xcodebuild[13914:99691] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2020-09-30 03:49:23.416 xcodebuild[13914:99691] [MT] IDETestOperationsObserverDebug: 335.611 sec, +335.611 sec -- end

Test session results, code coverage, and logs:
	/Users/runner/work/1/s/app-ios/Builds/xcresults/snipped.xcresult

Testing failed:
	snipped:
		The test runner encountered an error (Failed to prepare device 'Test - f204ffed - 20200930' for impending launch. If you believe this error represents a bug, please attach the result bundle at /Users/runner/work/1/s/app-ios/Builds/xcresult. (Underlying Error: Unable to boot the Simulator. launchd failed to respond. (Underlying Error: Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding)))

** TEST EXECUTE FAILED **

The actual output of this is:

Test Suite snipped.xctest started
snipped
    βœ” snipped (0.416 seconds)
Tests Passed: 0 failed, 1 total (0.423 seconds)

I'd have expected to see something more like:

Test Suite snipped.xctest started
snipped
    βœ” snipped (0.416 seconds)
Tests Passed: 0 failed, 1 total (0.423 seconds)
❌The test runner encountered an error (Failed to prepare device 'Test - f204ffed - 20200930' for impending launch. If you believe this error represents a bug, please attach the result bundle at /Users/runner/work/1/s/app-ios/Builds/xcresult. (Underlying Error: Unable to boot the Simulator. launchd failed to respond. (Underlying Error: Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding)))

I can share the full log privately if that's more helpful.

How to install on Linux (Docker)?

Is there a recommended installation method for xcbeautify on Linux other than building from source? I’d like to integrate this into the CI pipeline for my Vapor project but couldn’t find an installation method easy enough for a Docker setup. I’m probably missing something obvious, since I don’t have a lot of experience with Swift on Linux and Docker in general.

Fail to output properly on Xcode 11.3

Hi @thii,

We encounter this issue again since you fixed the same issue (#23 ) for Xcode 11.2... Unstable format of xcodebuild output is a real headache for xcbeautify.

Could you take a look?

The cause duplicate symbols is not completly displayed.

First I use xcodebuild to build my project, duplicated symbols are displayed with full path:

ld: warning: duplicate symbol '_ZSTD_copyCCtx' in:
    /Volumes/test_result/Build/Products/DailyBuild-iphonesimulator/XCFrameworkIntermediates/Btts/libbtts.a(zstd_compress.o)
    /Volumes/est_result/Build/Products/DailyBuildiphonesimulator/XCFrameworkIntermediates/Diagnose/DefaultLogger/mars.framework/mars(zstd_compress.c.o)

I use xcbeautify to filter my xcodebuild logs like below:

set -o pipefail && xcodebuild build-for-testing -workspace xxx -quiet | xcbeautify -qq


❌ duplicate symbol '_ZSTD_copyCCtx' in
❌ duplicate symbol '_ZSTD_getCParams' in

Only symbol name is printed. That's not easy to findout where are the duplicated objects.

I think it is a bug.

xcodebuild/xcbeautify hangs when a run script build phase containing only `export` is run

Got a bit of a weird one here!

In my Xcode project, I've got a run script build phase that just contains export. This is to print out the environment variables to the log.

CleanShot 2023-07-17 at 14 25 51@2x

For some reason, in version 0.21.0 of xcbeautify, the build gets hung up on that build phase.

I went through the process of git bisecting between 0.20.0 and 0.21.0, and the commit that seems to be the cause of the issue is this one: 215be3c.

I'm not sure why that change is causing things to hang, but in my testing, it does cause the problem.

Steps to Reproduce

Here's an example project you can use for testing: xcbeautify-test-project.zip

  1. Ensure xcbeautify 0.21.0 is installed
  2. Navigate your terminal to the root of the project
  3. Run xcrun xcodebuild | xcbeautify
  4. Note that the build hangs at the "Running script Print environment variables" phase
  5. Open the project in Xcode
  6. Delete the "Print environment variables" build phase
  7. Repeat step 3
  8. Note that the build succeeds as expected

Supression of warnings

Hi, thanks for the great project.

One thing I'm missing from it is the warnings suppression - Travis cancel jobs after 4MB of logs and building React Native projects for IOS often generates many warnings for the third party libraries.

Using some flag like --errors-only would be very helpful in that case

Support multiple versions of MacOS and Xcode

Update:

I have noticed xcbueatify cannot properly handle output from Xcode 11.2.1. So it may be a good idea to support different format of Xcode.

#################################

Could xcbeautify support different versions of OS and Xcode? If not yet, could these be implemented as new command line options?

Thanks!

Codesigning error lost

Origin log:

/Users/xxxxx/Example/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'XXPay' from project 'Pods')
/Users/xxxxx/Example/AAAA.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'AAAA_Example' from project 'AAAA')
/Users/xxxxx/Example/AAAA.xcodeproj: error: The file "/Users/xxxxx/AAAA/Example/configs/domestic/ueaws/app.entitlements" could not be opened. Verify the value of the CODE_SIGN_ENTITLEMENTS build setting for target "AAAA_Example" is correct and that the file exists on disk. (in target 'AAAA_Example' from project 'AAAA')

But no error show me from xcbeautify

xcodebuild stock at some error

My project in xcode14 would build with some error like this:

❌  error: Dependency for P1:target-MyApp-fce55c0e14fedcc57d73ec039f604d040bdc1e3e5eb2ad770e53e15b1d5e91df-:Ad-Hoc-Mirror:SwiftDriver Compilation Requirements xiaoheihe normal arm64 com.apple.xcode.tools.swift.compiler is not absolute (Pods/Headers/Public/ActionSheetPicker_3_0/ActionSheetPicker-3.0.modulemap). (in target 'MyApp' from project 'MyApp')

And xcbeautify will stock after encounter such error.

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.