nicklockwood / SwiftFormat

A command-line tool and Xcode Extension for formatting Swift code
MIT License
7.82k stars 635 forks source link

0.54.4 regression: Crash running `swiftformat` #1850

Closed NachoSoto closed 1 day ago

NachoSoto commented 1 week ago
$ swiftformat . --config config.swiftformat
Running SwiftFormat...
Illegal instruction: 4

Crash report

Open ``` ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: swiftformat [26520] Path: /usr/local/Cellar/swiftformat/0.54.4/bin/swiftformat Identifier: swiftformat Version: ??? Code Type: X86-64 (Translated) Parent Process: bash [89785] Responsible: iTerm2 [992] User ID: 502 Date/Time: 2024-09-08 08:53:44.5179 -0700 OS Version: macOS 14.6.1 (23G93) Report Version: 12 Anonymous UUID: 6021A40C-BD78-6726-FC0E-6DB80E7C7D7E Sleep/Wake UUID: 72BEB05F-F5D4-48FC-BE61-F986E302F1F9 Time Awake Since Boot: 520000 seconds Time Since Wake: 206 seconds System Integrity Protection: enabled Notes: PC register does not match crashing frame (0x0 vs 0x1036A4888) Crashed Thread: 25 Dispatch queue: swiftformat.formatting Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4 Terminating Process: exc handler [26520] Error Formulating Crash Report: PC register does not match crashing frame (0x0 vs 0x1036A4888) Thread 0:: Dispatch queue: com.apple.main-thread 0 ??? 0x7ff8abd06a78 ??? 1 libsystem_kernel.dylib 0x7ff81ba19846 __ulock_wait + 10 2 libdispatch.dylib 0x7ff81b8b75d4 _dlock_wait + 46 3 libdispatch.dylib 0x7ff81b8b7895 _dispatch_group_wait_slow + 42 4 swiftformat 0x102ff10e8 enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 2056 5 swiftformat 0x102ea559c specialized processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 1964 6 swiftformat 0x102e9ffd5 closure #10 in processArguments(_:environment:in:) + 309 7 swiftformat 0x102ea3dc9 partial apply for closure #10 in processArguments(_:environment:in:) + 105 8 swiftformat 0x102e99323 timeEvent(block:) + 35 9 swiftformat 0x102e95556 processArguments(_:environment:in:) + 17286 10 swiftformat 0x102e911a7 static CLI.run(in:with:) + 151 11 swiftformat 0x102e6876b CommandLineTool_main + 715 12 dyld 0x20341e345 start + 1909 Thread 1:: com.apple.rosetta.exceptionserver 0 runtime 0x7ff7ffd35414 0x7ff7ffd31000 + 17428 Thread 2:: Dispatch queue: com.apple.root.user-initiated-qos 0 libswiftCore.dylib 0x7ff82cbd9b40 swift_bridgeObjectRelease + 0 1 libswiftCore.dylib 0x7ff82cb74b5a swift_arrayDestroy + 138 2 libswiftCore.dylib 0x7ff82c9f46f0 _SetStorage.deinit + 192 3 libswiftCore.dylib 0x7ff82c9f4769 _SetStorage.__deallocating_deinit + 9 4 libswiftCore.dylib 0x7ff82cb87230 _swift_release_dealloc + 16 5 libswiftCore.dylib 0x7ff82cb87bdb bool swift::RefCounts>::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 123 6 swiftformat 0x102e6d7ed argumentsFor(_:excludingDefaults:) + 5037 7 swiftformat 0x102e6c2ba Options.addArguments(_:in:) + 154 8 swiftformat 0x102ff4b25 processDirectory(_:with:logger:) + 3269 9 swiftformat 0x102ff2add enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 1853 10 swiftformat 0x102ff4d84 closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 276 11 swiftformat 0x1030013a3 partial apply for closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 291 12 swiftformat 0x102ff0819 thunk for @escaping @callee_guaranteed @Sendable () -> () + 25 13 libdispatch.dylib 0x7ff81b8b5ac6 _dispatch_call_block_and_release + 12 14 libdispatch.dylib 0x7ff81b8b6dbc _dispatch_client_callout + 8 15 libdispatch.dylib 0x7ff81b8c6359 _dispatch_root_queue_drain + 1014 16 libdispatch.dylib 0x7ff81b8c684f _dispatch_worker_thread2 + 152 17 libsystem_pthread.dylib 0x7ff81ba54b43 _pthread_wqthread + 262 18 libsystem_pthread.dylib 0x7ff81ba53acf start_wqthread + 15 Thread 3:: Dispatch queue: com.apple.root.user-initiated-qos 0 ??? 0x7ff8abd06a78 ??? 1 libsystem_kernel.dylib 0x7ff81ba19846 __ulock_wait + 10 2 libdispatch.dylib 0x7ff81b8b75d4 _dlock_wait + 46 3 libdispatch.dylib 0x7ff81b8b73d2 _dispatch_wait_on_address + 129 4 libdispatch.dylib 0x7ff81b8b7895 _dispatch_group_wait_slow + 42 5 libswiftDispatch.dylib 0x7ff8327fa21f OS_dispatch_group.wait(wallTimeout:) + 15 6 swiftformat 0x102ff7fbb applyRules(_:to:with:trackChanges:range:maxIterations:callback:) + 5195 7 swiftformat 0x102e9f238 applyRules(_:options:lineRange:verbose:lint:reporter:) + 2072 8 swiftformat 0x102ea2357 closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 2583 9 swiftformat 0x102ea620b partial apply for closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 219 10 swiftformat 0x102ff3b38 enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 6040 11 swiftformat 0x102ff4d84 closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 276 12 swiftformat 0x1030013a3 partial apply for closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 291 13 swiftformat 0x102ff0819 thunk for @escaping @callee_guaranteed @Sendable () -> () + 25 14 libdispatch.dylib 0x7ff81b8b5ac6 _dispatch_call_block_and_release + 12 15 libdispatch.dylib 0x7ff81b8b6dbc _dispatch_client_callout + 8 16 libdispatch.dylib 0x7ff81b8c6359 _dispatch_root_queue_drain + 1014 17 libdispatch.dylib 0x7ff81b8c684f _dispatch_worker_thread2 + 152 18 libsystem_pthread.dylib 0x7ff81ba54b43 _pthread_wqthread + 262 19 libsystem_pthread.dylib 0x7ff81ba53acf start_wqthread + 15 Thread 4: 0 runtime 0x7ff7ffd5394c 0x7ff7ffd31000 + 141644 Thread 5: 0 runtime 0x7ff7ffd5394c 0x7ff7ffd31000 + 141644 Thread 6:: Dispatch queue: com.apple.root.user-initiated-qos 0 ??? 0x7ff8abd06a78 ??? 1 libsystem_kernel.dylib 0x7ff81ba19846 __ulock_wait + 10 2 libdispatch.dylib 0x7ff81b8b75d4 _dlock_wait + 46 3 libdispatch.dylib 0x7ff81b8b73d2 _dispatch_wait_on_address + 129 4 libdispatch.dylib 0x7ff81b8b7895 _dispatch_group_wait_slow + 42 5 libswiftDispatch.dylib 0x7ff8327fa21f OS_dispatch_group.wait(wallTimeout:) + 15 6 swiftformat 0x102ff7fbb applyRules(_:to:with:trackChanges:range:maxIterations:callback:) + 5195 7 swiftformat 0x102e9f238 applyRules(_:options:lineRange:verbose:lint:reporter:) + 2072 8 swiftformat 0x102ea2357 closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 2583 9 swiftformat 0x102ea620b partial apply for closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 219 10 swiftformat 0x102ff3b38 enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 6040 11 swiftformat 0x102ff4d84 closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 276 12 swiftformat 0x1030013a3 partial apply for closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 291 13 swiftformat 0x102ff0819 thunk for @escaping @callee_guaranteed @Sendable () -> () + 25 14 libdispatch.dylib 0x7ff81b8b5ac6 _dispatch_call_block_and_release + 12 15 libdispatch.dylib 0x7ff81b8b6dbc _dispatch_client_callout + 8 16 libdispatch.dylib 0x7ff81b8c6359 _dispatch_root_queue_drain + 1014 17 libdispatch.dylib 0x7ff81b8c684f _dispatch_worker_thread2 + 152 18 libsystem_pthread.dylib 0x7ff81ba54b43 _pthread_wqthread + 262 19 libsystem_pthread.dylib 0x7ff81ba53acf start_wqthread + 15 Thread 7: 0 runtime 0x7ff7ffd5394c 0x7ff7ffd31000 + 141644 Thread 8:: Dispatch queue: com.apple.root.user-initiated-qos 0 ??? 0x7ff8abd06a78 ??? 1 libsystem_kernel.dylib 0x7ff81ba19846 __ulock_wait + 10 2 libdispatch.dylib 0x7ff81b8b75d4 _dlock_wait + 46 3 libdispatch.dylib 0x7ff81b8b73d2 _dispatch_wait_on_address + 129 4 libdispatch.dylib 0x7ff81b8b7895 _dispatch_group_wait_slow + 42 5 libswiftDispatch.dylib 0x7ff8327fa21f OS_dispatch_group.wait(wallTimeout:) + 15 6 swiftformat 0x102ff7fbb applyRules(_:to:with:trackChanges:range:maxIterations:callback:) + 5195 7 swiftformat 0x102e9f238 applyRules(_:options:lineRange:verbose:lint:reporter:) + 2072 8 swiftformat 0x102ea2357 closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 2583 9 swiftformat 0x102ea620b partial apply for closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 219 10 swiftformat 0x102ff3b38 enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 6040 11 swiftformat 0x102ff4d84 closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 276 12 swiftformat 0x1030013a3 partial apply for closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 291 13 swiftformat 0x102ff0819 thunk for @escaping @callee_guaranteed @Sendable () -> () + 25 14 libdispatch.dylib 0x7ff81b8b5ac6 _dispatch_call_block_and_release + 12 15 libdispatch.dylib 0x7ff81b8b6dbc _dispatch_client_callout + 8 16 libdispatch.dylib 0x7ff81b8c6359 _dispatch_root_queue_drain + 1014 17 libdispatch.dylib 0x7ff81b8c684f _dispatch_worker_thread2 + 152 18 libsystem_pthread.dylib 0x7ff81ba54b43 _pthread_wqthread + 262 19 libsystem_pthread.dylib 0x7ff81ba53acf start_wqthread + 15 Thread 9:: Dispatch queue: com.apple.root.user-initiated-qos 0 ??? 0x7ff8abd06a78 ??? 1 libsystem_kernel.dylib 0x7ff81ba19846 __ulock_wait + 10 2 libdispatch.dylib 0x7ff81b8b75d4 _dlock_wait + 46 3 libdispatch.dylib 0x7ff81b8b73d2 _dispatch_wait_on_address + 129 4 libdispatch.dylib 0x7ff81b8b7895 _dispatch_group_wait_slow + 42 5 libswiftDispatch.dylib 0x7ff8327fa21f OS_dispatch_group.wait(wallTimeout:) + 15 6 swiftformat 0x102ff7fbb applyRules(_:to:with:trackChanges:range:maxIterations:callback:) + 5195 7 swiftformat 0x102e9f238 applyRules(_:options:lineRange:verbose:lint:reporter:) + 2072 8 swiftformat 0x102ea2357 closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 2583 9 swiftformat 0x102ea620b partial apply for closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 219 10 swiftformat 0x102ff3b38 enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 6040 11 swiftformat 0x102ff4d84 closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 276 12 swiftformat 0x1030013a3 partial apply for closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 291 13 swiftformat 0x102ff0819 thunk for @escaping @callee_guaranteed @Sendable () -> () + 25 14 libdispatch.dylib 0x7ff81b8b5ac6 _dispatch_call_block_and_release + 12 15 libdispatch.dylib 0x7ff81b8b6dbc _dispatch_client_callout + 8 16 libdispatch.dylib 0x7ff81b8c6359 _dispatch_root_queue_drain + 1014 17 libdispatch.dylib 0x7ff81b8c684f _dispatch_worker_thread2 + 152 18 libsystem_pthread.dylib 0x7ff81ba54b43 _pthread_wqthread + 262 19 libsystem_pthread.dylib 0x7ff81ba53acf start_wqthread + 15 Thread 10: 0 runtime 0x7ff7ffd5394c 0x7ff7ffd31000 + 141644 Thread 11:: Dispatch queue: swiftformat.formatting 0 swiftformat 0x10301eb02 DYLD-STUB$$swift_bridgeObjectRetain + 0 1 swiftformat 0x102ec3302 specialized Formatter.forEachToken(onlyWhereEnabled:_:) + 578 2 swiftformat 0x102f86525 closure #1 in variable initialization expression of _FormatRules.enumNamespaces + 37 3 swiftformat 0x102ffa1d3 closure #5 in applyRules(_:to:with:trackChanges:range:maxIterations:callback:) + 83 4 swiftformat 0x102ff0819 thunk for @escaping @callee_guaranteed @Sendable () -> () + 25 5 libdispatch.dylib 0x7ff81b8b5ac6 _dispatch_call_block_and_release + 12 6 libdispatch.dylib 0x7ff81b8b6dbc _dispatch_client_callout + 8 7 libdispatch.dylib 0x7ff81b8bd003 _dispatch_lane_serial_drain + 1060 8 libdispatch.dylib 0x7ff81b8bd997 _dispatch_lane_invoke + 377 9 libdispatch.dylib 0x7ff81b8c7414 _dispatch_root_queue_drain_deferred_wlh + 271 10 libdispatch.dylib 0x7ff81b8c6d2a _dispatch_workloop_worker_thread + 451 11 libsystem_pthread.dylib 0x7ff81ba54b84 _pthread_wqthread + 327 12 libsystem_pthread.dylib 0x7ff81ba53acf start_wqthread + 15 Thread 12:: Dispatch queue: swiftformat.formatting 0 swiftformat 0x102ec32cc specialized Formatter.forEachToken(onlyWhereEnabled:_:) + 524 1 swiftformat 0x102ecdd4c Formatter.wrapCollectionsAndArguments(completePartialWrapping:wrapSingleArguments:) + 268 2 swiftformat 0x102f9ca36 closure #1 in variable initialization expression of _FormatRules.wrapArguments + 22 3 swiftformat 0x102ffa1d3 closure #5 in applyRules(_:to:with:trackChanges:range:maxIterations:callback:) + 83 4 swiftformat 0x102ff0819 thunk for @escaping @callee_guaranteed @Sendable () -> () + 25 5 libdispatch.dylib 0x7ff81b8b5ac6 _dispatch_call_block_and_release + 12 6 libdispatch.dylib 0x7ff81b8b6dbc _dispatch_client_callout + 8 7 libdispatch.dylib 0x7ff81b8bd003 _dispatch_lane_serial_drain + 1060 8 libdispatch.dylib 0x7ff81b8bd997 _dispatch_lane_invoke + 377 9 libdispatch.dylib 0x7ff81b8c7414 _dispatch_root_queue_drain_deferred_wlh + 271 10 libdispatch.dylib 0x7ff81b8c6d2a _dispatch_workloop_worker_thread + 451 11 libsystem_pthread.dylib 0x7ff81ba54b84 _pthread_wqthread + 327 12 libsystem_pthread.dylib 0x7ff81ba53acf start_wqthread + 15 Thread 13:: Dispatch queue: com.apple.root.user-initiated-qos 0 ??? 0x7ff8abd06a78 ??? 1 libsystem_kernel.dylib 0x7ff81ba19846 __ulock_wait + 10 2 libdispatch.dylib 0x7ff81b8b75d4 _dlock_wait + 46 3 libdispatch.dylib 0x7ff81b8b73d2 _dispatch_wait_on_address + 129 4 libdispatch.dylib 0x7ff81b8b7895 _dispatch_group_wait_slow + 42 5 libswiftDispatch.dylib 0x7ff8327fa21f OS_dispatch_group.wait(wallTimeout:) + 15 6 swiftformat 0x102ff7fbb applyRules(_:to:with:trackChanges:range:maxIterations:callback:) + 5195 7 swiftformat 0x102e9f238 applyRules(_:options:lineRange:verbose:lint:reporter:) + 2072 8 swiftformat 0x102ea2357 closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 2583 9 swiftformat 0x102ea620b partial apply for closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 219 10 swiftformat 0x102ff3b38 enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 6040 11 swiftformat 0x102ff4d84 closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 276 12 swiftformat 0x1030013a3 partial apply for closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 291 13 swiftformat 0x102ff0819 thunk for @escaping @callee_guaranteed @Sendable () -> () + 25 14 libdispatch.dylib 0x7ff81b8b5ac6 _dispatch_call_block_and_release + 12 15 libdispatch.dylib 0x7ff81b8b6dbc _dispatch_client_callout + 8 16 libdispatch.dylib 0x7ff81b8c6359 _dispatch_root_queue_drain + 1014 17 libdispatch.dylib 0x7ff81b8c684f _dispatch_worker_thread2 + 152 18 libsystem_pthread.dylib 0x7ff81ba54b43 _pthread_wqthread + 262 19 libsystem_pthread.dylib 0x7ff81ba53acf start_wqthread + 15 Thread 14: 0 runtime 0x7ff7ffd5394c 0x7ff7ffd31000 + 141644 Thread 15: 0 runtime 0x7ff7ffd5394c 0x7ff7ffd31000 + 141644 Thread 16: 0 runtime 0x7ff7ffd5394c 0x7ff7ffd31000 + 141644 Thread 17:: Dispatch queue: swiftformat.formatting 0 libsystem_platform.dylib 0x7ff81ba89840 _platform_memmove$VARIANT$Rosetta + 0 1 swiftformat 0x102e8ccdb specialized _ArrayBuffer._consumeAndCreateNew(bufferIsUnique:minimumCapacity:growForAppend:) + 123 2 swiftformat 0x102e72285 String.editDistance(from:) + 1989 3 swiftformat 0x102ef5209 specialized closure #5 in Formatter.removeExistingCategorySeparators(from:with:) + 841 4 swiftformat 0x102edb554 Formatter.removeExistingCategorySeparators(from:with:) + 2292 5 swiftformat 0x102edbea1 Formatter.organizeType(_:) + 1169 6 swiftformat 0x102fb4d6d closure #1 in closure #1 in variable initialization expression of _FormatRules.organizeDeclarations + 77 7 swiftformat 0x102ef4cf1 partial apply for closure #1 in Formatter.mapRecursiveDeclarations(with:) + 17 8 swiftformat 0x102ed6726 closure #1 in Formatter.mapRecursiveDeclarations(_:in:with:) + 86 9 swiftformat 0x102fe8cb1 specialized Collection.map(_:) + 209 10 swiftformat 0x102f66a16 specialized Collection.map(_:) + 22 11 swiftformat 0x102ed69fd closure #1 in Formatter.mapRecursiveDeclarations(_:in:with:) + 813 12 swiftformat 0x102fe8cb1 specialized Collection.map(_:) + 209 13 swiftformat 0x102ed5a5d Formatter.mapRecursiveDeclarations(with:) + 109 14 swiftformat 0x102fb4d10 closure #1 in variable initialization expression of _FormatRules.organizeDeclarations + 80 15 swiftformat 0x102ffa1d3 closure #5 in applyRules(_:to:with:trackChanges:range:maxIterations:callback:) + 83 16 swiftformat 0x102ff0819 thunk for @escaping @callee_guaranteed @Sendable () -> () + 25 17 libdispatch.dylib 0x7ff81b8b5ac6 _dispatch_call_block_and_release + 12 18 libdispatch.dylib 0x7ff81b8b6dbc _dispatch_client_callout + 8 19 libdispatch.dylib 0x7ff81b8bd003 _dispatch_lane_serial_drain + 1060 20 libdispatch.dylib 0x7ff81b8bd997 _dispatch_lane_invoke + 377 21 libdispatch.dylib 0x7ff81b8c7414 _dispatch_root_queue_drain_deferred_wlh + 271 22 libdispatch.dylib 0x7ff81b8c6d2a _dispatch_workloop_worker_thread + 451 23 libsystem_pthread.dylib 0x7ff81ba54b84 _pthread_wqthread + 327 24 libsystem_pthread.dylib 0x7ff81ba53acf start_wqthread + 15 Thread 18:: Dispatch queue: com.apple.root.user-initiated-qos 0 ??? 0x7ff8abd06a78 ??? 1 libsystem_kernel.dylib 0x7ff81ba19846 __ulock_wait + 10 2 libdispatch.dylib 0x7ff81b8b75d4 _dlock_wait + 46 3 libdispatch.dylib 0x7ff81b8b73d2 _dispatch_wait_on_address + 129 4 libdispatch.dylib 0x7ff81b8b7895 _dispatch_group_wait_slow + 42 5 libswiftDispatch.dylib 0x7ff8327fa21f OS_dispatch_group.wait(wallTimeout:) + 15 6 swiftformat 0x102ff7fbb applyRules(_:to:with:trackChanges:range:maxIterations:callback:) + 5195 7 swiftformat 0x102e9f238 applyRules(_:options:lineRange:verbose:lint:reporter:) + 2072 8 swiftformat 0x102ea2357 closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 2583 9 swiftformat 0x102ea620b partial apply for closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 219 10 swiftformat 0x102ff3b38 enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 6040 11 swiftformat 0x102ff4d84 closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 276 12 swiftformat 0x1030013a3 partial apply for closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 291 13 swiftformat 0x102ff0819 thunk for @escaping @callee_guaranteed @Sendable () -> () + 25 14 libdispatch.dylib 0x7ff81b8b5ac6 _dispatch_call_block_and_release + 12 15 libdispatch.dylib 0x7ff81b8b6dbc _dispatch_client_callout + 8 16 libdispatch.dylib 0x7ff81b8c6359 _dispatch_root_queue_drain + 1014 17 libdispatch.dylib 0x7ff81b8c684f _dispatch_worker_thread2 + 152 18 libsystem_pthread.dylib 0x7ff81ba54b43 _pthread_wqthread + 262 19 libsystem_pthread.dylib 0x7ff81ba53acf start_wqthread + 15 Thread 19: 0 runtime 0x7ff7ffd5394c 0x7ff7ffd31000 + 141644 Thread 20:: Dispatch queue: com.apple.root.user-initiated-qos 0 ??? 0x7ff8abd06a78 ??? 1 libsystem_kernel.dylib 0x7ff81ba19846 __ulock_wait + 10 2 libdispatch.dylib 0x7ff81b8b75d4 _dlock_wait + 46 3 libdispatch.dylib 0x7ff81b8b73d2 _dispatch_wait_on_address + 129 4 libdispatch.dylib 0x7ff81b8b7895 _dispatch_group_wait_slow + 42 5 libswiftDispatch.dylib 0x7ff8327fa21f OS_dispatch_group.wait(wallTimeout:) + 15 6 swiftformat 0x102ff7fbb applyRules(_:to:with:trackChanges:range:maxIterations:callback:) + 5195 7 swiftformat 0x102e9f238 applyRules(_:options:lineRange:verbose:lint:reporter:) + 2072 8 swiftformat 0x102ea2357 closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 2583 9 swiftformat 0x102ea620b partial apply for closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 219 10 swiftformat 0x102ff3b38 enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 6040 11 swiftformat 0x102ff4d84 closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 276 12 swiftformat 0x1030013a3 partial apply for closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 291 13 swiftformat 0x102ff0819 thunk for @escaping @callee_guaranteed @Sendable () -> () + 25 14 libdispatch.dylib 0x7ff81b8b5ac6 _dispatch_call_block_and_release + 12 15 libdispatch.dylib 0x7ff81b8b6dbc _dispatch_client_callout + 8 16 libdispatch.dylib 0x7ff81b8c6359 _dispatch_root_queue_drain + 1014 17 libdispatch.dylib 0x7ff81b8c684f _dispatch_worker_thread2 + 152 18 libsystem_pthread.dylib 0x7ff81ba54b43 _pthread_wqthread + 262 19 libsystem_pthread.dylib 0x7ff81ba53acf start_wqthread + 15 Thread 21:: Dispatch queue: com.apple.root.user-initiated-qos 0 ??? 0x7ff8abd06a78 ??? 1 libsystem_kernel.dylib 0x7ff81ba19846 __ulock_wait + 10 2 libdispatch.dylib 0x7ff81b8b75d4 _dlock_wait + 46 3 libdispatch.dylib 0x7ff81b8b73d2 _dispatch_wait_on_address + 129 4 libdispatch.dylib 0x7ff81b8b7895 _dispatch_group_wait_slow + 42 5 libswiftDispatch.dylib 0x7ff8327fa21f OS_dispatch_group.wait(wallTimeout:) + 15 6 swiftformat 0x102ff7fbb applyRules(_:to:with:trackChanges:range:maxIterations:callback:) + 5195 7 swiftformat 0x102e9f238 applyRules(_:options:lineRange:verbose:lint:reporter:) + 2072 8 swiftformat 0x102ea2357 closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 2583 9 swiftformat 0x102ea620b partial apply for closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 219 10 swiftformat 0x102ff3b38 enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 6040 11 swiftformat 0x102ff4d84 closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 276 12 swiftformat 0x1030013a3 partial apply for closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 291 13 swiftformat 0x102ff0819 thunk for @escaping @callee_guaranteed @Sendable () -> () + 25 14 libdispatch.dylib 0x7ff81b8b5ac6 _dispatch_call_block_and_release + 12 15 libdispatch.dylib 0x7ff81b8b6dbc _dispatch_client_callout + 8 16 libdispatch.dylib 0x7ff81b8c6359 _dispatch_root_queue_drain + 1014 17 libdispatch.dylib 0x7ff81b8c684f _dispatch_worker_thread2 + 152 18 libsystem_pthread.dylib 0x7ff81ba54b43 _pthread_wqthread + 262 19 libsystem_pthread.dylib 0x7ff81ba53acf start_wqthread + 15 Thread 22:: Dispatch queue: swiftformat.formatting 0 libsystem_platform.dylib 0x7ff81ba899c7 _platform_memmove$VARIANT$Rosetta + 391 1 libswiftCore.dylib 0x7ff82cb5f5b7 initializeWithCopy for ClosedRange<>.Index + 71 2 swiftformat 0x102e8f5b9 outlined init with copy of FormatOptions? + 41 3 swiftformat 0x102ec331f specialized Formatter.forEachToken(onlyWhereEnabled:_:) + 607 4 swiftformat 0x102f6eb02 closure #1 in variable initialization expression of _FormatRules.spaceInsideBrackets + 162 5 swiftformat 0x102ffa1d3 closure #5 in applyRules(_:to:with:trackChanges:range:maxIterations:callback:) + 83 6 swiftformat 0x102ff0819 thunk for @escaping @callee_guaranteed @Sendable () -> () + 25 7 libdispatch.dylib 0x7ff81b8b5ac6 _dispatch_call_block_and_release + 12 8 libdispatch.dylib 0x7ff81b8b6dbc _dispatch_client_callout + 8 9 libdispatch.dylib 0x7ff81b8bd003 _dispatch_lane_serial_drain + 1060 10 libdispatch.dylib 0x7ff81b8bd997 _dispatch_lane_invoke + 377 11 libdispatch.dylib 0x7ff81b8c7414 _dispatch_root_queue_drain_deferred_wlh + 271 12 libdispatch.dylib 0x7ff81b8c6d2a _dispatch_workloop_worker_thread + 451 13 libsystem_pthread.dylib 0x7ff81ba54b84 _pthread_wqthread + 327 14 libsystem_pthread.dylib 0x7ff81ba53acf start_wqthread + 15 Thread 23:: Dispatch queue: com.apple.root.user-initiated-qos 0 ??? 0x7ff8abd06a78 ??? 1 libsystem_kernel.dylib 0x7ff81ba19846 __ulock_wait + 10 2 libdispatch.dylib 0x7ff81b8b75d4 _dlock_wait + 46 3 libdispatch.dylib 0x7ff81b8b73d2 _dispatch_wait_on_address + 129 4 libdispatch.dylib 0x7ff81b8b7895 _dispatch_group_wait_slow + 42 5 libswiftDispatch.dylib 0x7ff8327fa21f OS_dispatch_group.wait(wallTimeout:) + 15 6 swiftformat 0x102ff7fbb applyRules(_:to:with:trackChanges:range:maxIterations:callback:) + 5195 7 swiftformat 0x102e9f238 applyRules(_:options:lineRange:verbose:lint:reporter:) + 2072 8 swiftformat 0x102ea2357 closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 2583 9 swiftformat 0x102ea620b partial apply for closure #4 in processInput(_:andWriteToOutput:options:overrides:lineRange:verbose:dryrun:lint:lenient:cacheURL:reporter:) + 219 10 swiftformat 0x102ff3b38 enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 6040 11 swiftformat 0x102ff4d84 closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 276 12 swiftformat 0x1030013a3 partial apply for closure #5 in enumerate #1 (inputURL:outputURL:options:) in enumerateFiles(withInputURL:outputURL:options:concurrent:logger:skipped:handler:) + 291 13 swiftformat 0x102ff0819 thunk for @escaping @callee_guaranteed @Sendable () -> () + 25 14 libdispatch.dylib 0x7ff81b8b5ac6 _dispatch_call_block_and_release + 12 15 libdispatch.dylib 0x7ff81b8b6dbc _dispatch_client_callout + 8 16 libdispatch.dylib 0x7ff81b8c6359 _dispatch_root_queue_drain + 1014 17 libdispatch.dylib 0x7ff81b8c684f _dispatch_worker_thread2 + 152 18 libsystem_pthread.dylib 0x7ff81ba54b43 _pthread_wqthread + 262 19 libsystem_pthread.dylib 0x7ff81ba53acf start_wqthread + 15 Thread 24:: Dispatch queue: swiftformat.formatting 0 swiftformat 0x103003de0 Token.isEndOfScope(_:) + 32 1 swiftformat 0x102eb6a62 specialized Formatter.index(in:where:) + 450 2 swiftformat 0x102f5b9d7 Formatter.endOfDeclaration(atDeclarationKeyword:fallBackToEndOfScope:) + 1463 3 swiftformat 0x102f5bbe0 closure #1 in Formatter.parseDeclarations() + 160 4 swiftformat 0x102ec3e46 specialized Formatter.forEachToken(onlyWhereEnabled:_:) + 950 5 swiftformat 0x102f4e470 Formatter.parseDeclarations() + 80 6 swiftformat 0x102f5c9c3 parseBody #1 (in:) in closure #2 in Formatter.parseDeclarations() + 1587 7 swiftformat 0x102f5c00d closure #2 in Formatter.parseDeclarations() + 605 8 swiftformat 0x102f4e5b8 Formatter.parseDeclarations() + 408 9 swiftformat 0x102f5c9c3 parseBody #1 (in:) in closure #2 in Formatter.parseDeclarations() + 1587 10 swiftformat 0x102f5c27a closure #2 in Formatter.parseDeclarations() + 1226 11 swiftformat 0x102f4e5b8 Formatter.parseDeclarations() + 408 12 swiftformat 0x102fb4e35 closure #1 in variable initialization expression of _FormatRules.extensionAccessControl + 69 13 swiftformat 0x102ffa1d3 closure #5 in applyRules(_:to:with:trackChanges:range:maxIterations:callback:) + 83 14 swiftformat 0x102ff0819 thunk for @escaping @callee_guaranteed @Sendable () -> () + 25 15 libdispatch.dylib 0x7ff81b8b5ac6 _dispatch_call_block_and_release + 12 16 libdispatch.dylib 0x7ff81b8b6dbc _dispatch_client_callout + 8 17 libdispatch.dylib 0x7ff81b8bd003 _dispatch_lane_serial_drain + 1060 18 libdispatch.dylib 0x7ff81b8bd997 _dispatch_lane_invoke + 377 19 libdispatch.dylib 0x7ff81b8c7414 _dispatch_root_queue_drain_deferred_wlh + 271 20 libdispatch.dylib 0x7ff81b8c6d2a _dispatch_workloop_worker_thread + 451 21 libsystem_pthread.dylib 0x7ff81ba54b84 _pthread_wqthread + 327 22 libsystem_pthread.dylib 0x7ff81ba53acf start_wqthread + 15 Thread 25 Crashed:: Dispatch queue: swiftformat.formatting 0 0x1036a4888 ??? 1 swiftformat 0x102f95694 specialized removeUsed #1 (from:with:locals:in:) in closure #1 in variable initialization expression of _FormatRules.unusedArguments + 3044 2 swiftformat 0x102f98fcd closure #2 in closure #1 in variable initialization expression of _FormatRules.unusedArguments + 2989 3 swiftformat 0x102ec5d2b specialized Formatter.forEachToken(onlyWhereEnabled:_:) + 923 4 swiftformat 0x102f94a9e closure #1 in variable initialization expression of _FormatRules.unusedArguments + 174 5 swiftformat 0x102ffa1d3 closure #5 in applyRules(_:to:with:trackChanges:range:maxIterations:callback:) + 83 6 swiftformat 0x102ff0819 thunk for @escaping @callee_guaranteed @Sendable () -> () + 25 7 libdispatch.dylib 0x7ff81b8b5ac6 _dispatch_call_block_and_release + 12 8 libdispatch.dylib 0x7ff81b8b6dbc _dispatch_client_callout + 8 9 libdispatch.dylib 0x7ff81b8bd003 _dispatch_lane_serial_drain + 1060 10 libdispatch.dylib 0x7ff81b8bd997 _dispatch_lane_invoke + 377 11 libdispatch.dylib 0x7ff81b8c7414 _dispatch_root_queue_drain_deferred_wlh + 271 12 libdispatch.dylib 0x7ff81b8c6d2a _dispatch_workloop_worker_thread + 451 13 libsystem_pthread.dylib 0x7ff81ba54b84 _pthread_wqthread + 327 14 libsystem_pthread.dylib 0x7ff81ba53acf start_wqthread + 15 ```

Other information:

I've isolated it to a particular file in our codebase, and running it with --dry-run doesn't crash, so I can see it's one of these 2 rules:

$ swiftformat File.swift --config config.swiftformat --verbose --dryrun
Running SwiftFormat...
(dryrun mode - no files will be changed.)
Formatting File.swift
-- rules applied: blankLinesAtStartOfScope, organizeDeclarations
SwiftFormat completed in 0.36s.
1/1 files would have been formatted.

Removing code chunk by chunk on that file I isolated it to these 3 lines inside the constructor:

// Some comment
if propertyA.x == nil {
  self.propertyB = propertyA.y.z?.q
}

Edit: Actually if I run it with --dry-run and the whole file it still crashes, so the information above is probably only part of the reason it was crashing. Looks like based on the crash report it's unusedArguments.

nicklockwood commented 1 week ago

@NachoSoto thanks for the report. What does your config.swift file look like?

NachoSoto commented 1 week ago

Here you go:

--swiftversion 5.10
--self remove # redundantSelf
--importgrouping testable-bottom # sortedImports
--commas always # trailingCommas
--trimwhitespace always # trailingSpace
--indent 2 #indent
--ifdef no-indent #indent
--indentstrings true #indent
--wraparguments before-first # wrapArguments
--wrapparameters before-first # wrapArguments
--wrapcollections before-first # wrapArguments
--wrapconditions before-first # wrapArguments
--wrapreturntype if-multiline #wrapArguments
--wrapeffects if-multiline #wrapArguments
--closingparen same-line # wrapArguments
--wraptypealiases before-first # wrapArguments
--funcattributes prev-line # wrapAttributes
--computedvarattrs prev-line # wrapAttributes
--storedvarattrs same-line # wrapAttributes
--complexattrs prev-line # wrapAttributes
--typeattributes prev-line # wrapAttributes
--wrapternary before-operators # wrap
--structthreshold 20 # organizeDeclarations
--enumthreshold 20 # organizeDeclarations
--organizetypes class,struct,enum,extension,actor # organizeDeclarations
--extensionacl on-declarations # extensionAccessControl
--patternlet inline # hoistPatternLet
--redundanttype inferred # redundantType, propertyType
--emptybraces spaced # emptyBraces
--someAny disabled # opaqueGenericParameters
--elseposition same-line # elseOnSameLine
--guardelse next-line # elseOnSameLine
--onelineforeach convert # preferForLoop
--shortoptionals always # typeSugar
--semicolons never # semicolons
--doccomments preserve # docComments

--minversion 0.54.4
--typeblanklines remove # blankLinesAtStartOfScope, blankLinesAtEndOfScope

--maxwidth 130 # wrap

--rules anyObjectProtocol
--rules blankLinesBetweenScopes
--rules consecutiveSpaces
--rules duplicateImports
--rules extensionAccessControl
--rules hoistPatternLet
--rules indent
--rules markTypes
--rules organizeDeclarations
--rules redundantParens
--rules redundantReturn
--rules redundantSelf
--rules redundantType
--rules redundantPattern
--rules redundantGet
--rules redundantFileprivate
--rules redundantRawValues
--rules sortImports
--rules sortDeclarations
--rules strongifiedSelf
--rules trailingCommas
--rules trailingSpace
--rules typeSugar
--rules wrap
--rules wrapMultilineStatementBraces
--rules wrapArguments
--rules wrapAttributes
--rules braces
--rules redundantClosure
--rules redundantInit
--rules redundantVoidReturnType
--rules redundantOptionalBinding
--rules redundantInternal
--rules unusedArguments
--rules spaceInsideBrackets
--rules spaceInsideBraces
--rules spaceAroundBraces
--rules spaceInsideParens
--rules spaceAroundParens
--rules enumNamespaces
--rules blockComments
--rules docComments
--rules spaceAroundComments
--rules spaceInsideComments
--rules blankLinesAtStartOfScope
--rules blankLinesAtEndOfScope
--rules emptyBraces
--rules andOperator
--rules opaqueGenericParameters
--rules genericExtensions
--rules trailingClosures
--rules elseOnSameLine
--rules sortTypealiases
--rules preferForLoop
--rules conditionalAssignment
--rules wrapMultilineConditionalAssignment
--rules blankLineAfterSwitchCase
--rules consistentSwitchCaseSpacing
--rules semicolons
--rules blankLinesAroundMark
--rules consecutiveBlankLines
--rules isEmpty
--rules initCoderUnavailable
--rules modifierOrder
nicklockwood commented 1 week ago

@NachoSoto for me, running this command:

swiftformat . --config config.swiftformat

with swiftformat 0.54.4, on a folder containing just the config above and a swift file with the contents:

// Some comment
if propertyA.x == nil {
    self.propertyB = propertyA.y.z?.q
}

completes without error. Assuming that's not the case for you, any idea what variables might be different?

NachoSoto commented 1 week ago

Yeah that's not a valid repro. The file in question is 1600+ lines which I can't share unfortunately, and I have been unable to find a small repro for it.

NachoSoto commented 1 week ago

Here's a repro:

@MainActor
public final class A: ObservableObject {
    // MARK: Lifecycle

    public init(
        a3: A42.ID,
        a4: A43,
        a5: some Publisher<Bool, Never>,
        a6: @escaping (A44) -> Void,
        a7: @escaping (A45) -> Void,
        a8: @escaping () -> Void
    ) {
        self.a3 = a3
        self.a4 = a4
        self.a6 = a6
        self.a7 = a7
        self.a8 = a8
        a9 = A46(a: a4.a.b)
        a11 = a4.a11

        a10?.$a12.assign(to: &$a13)

        a4.$a11
            .removeDuplicates()
            .dropFirst()
            .assign(to: &$a11)

        a4.$a
            .map { A46(a: $0.a) }
            .weakAssign(to: \.a9, on: self)
            .store(in: &a14)

        a19
            .map(\.a20)
            .removeDuplicates()
            .assign(to: &$a21)

        a15.a22
            .sink { [weak self] a23, error in
                guard self?.a17.contains(a23.id) == true else { return }

                Task { [a24 = self?.a24] in
                    await a24?.present(A25.a26(a23.a27, .init(error)))

                    switch a23.a27 {
                    case .a28, .a29, .a30:
                        A31.a32(.a33(.a34Failed))
                    #if !A34
                    case .a35:
                        A31.a32(.a33(.a34Failed))
                    #endif

                    case .a36:
                        break
                    }
                }
            }
            .store(in: &a14)

        a19
            .map {
                if $0.contains(where: { $0.a27.a37 }) {
                    A38.a39
                } else if $0.contains(where: { $0.a27.a40 }) {
                    A38.a41
                } else {
                    A38.a42
                }
            }
            .removeDuplicates()
            .handleEvents(receiveOutput: { next in
                A43.debug("A44: \(next)")
            })
            .assign(to: &$a45)

        a4.$a46
            .map(\.a47)
            .removeDuplicates()
            .assign(to: &$a48)

        a4.$a49
            .assign(to: &$a50)

        let a51: AnyPublisher<A52?, Never>
        let a53 = a4.$a.map(\.a?.a54)

        let a55 = { [a56] a57 in
            a56.$a58
                .map(\.[a57])
                .map { x in
                    if let a59 = x?.a54 {
                        AnyPublisher(Just<A52?>(.init(a59)))
                    } else {
                        AnyPublisher(a53)
                    }
                }
                .switchToLatest()
        }

        a51 = .init(
            a4.$a57
                .removeDuplicates()
                .map { a57 in
                    if let a57 {
                        AnyPublisher(a55(a57))
                    } else {
                        AnyPublisher(a53)
                    }
                }
                .switchToLatest())

        a51.map(\.?.a60)
            .removeDuplicates()
            .sink { [weak self] _ in
                guard let self else { return }
                if !a17.isEmpty {
                    a15.a61(a17)
                    a17 = []
                }
            }
            .store(in: &a14)

        if a4.a57 == nil {
            self.a51 = a4.a.b?.a54
        }
        a51.assign(to: &$a51)

        a4.a62(
            a63: A64.shared.a65(for: a3).a66())
            .assign(to: &$a67)

        a5.assign(to: &$a68)

        a4.$a69
            .assign(to: &$a70)
        a71()

        $a72
            .map { $0 != nil }
            .removeDuplicates()
            .assign(to: &$a73)

        a74.a75(for: .known(.a76))
            .assign(to: &$a72)

        a4.$a77
            .removeDuplicates()
            .combineLatest(a74.a75(for: .a(.a78)))
            .sink { [weak self] a77, a78 in
                self?.a79 = a78 != nil
                self?.a80 = a77.map {
                    A81(
                        a82: $0,
                        a83: { [weak self] in self?.a4.a84() },
                        a85: { [weak self] in self?.a86($0) })
                }
            }
            .store(in: &a14)

        runAttachedTask { weakSelf in
            weakSelf.value?.a87 = await A88.x()
        }

        a89
            .a90
            .assign(to: &$a91)

        #if os(macOS) && !A34
        a92
            .$a93
            .map { [a4] a94 in
                guard a94?.a95 == a4.a96.id else { return nil }
                return a94?.a97
            }
            .assign(to: &$a98)
        #endif

        if Self.a99 == nil {
            Self.a99 = a100
        }
        a101()
    }
}
nicklockwood commented 1 week ago

@NachoSoto thanks, that was very helpful. I've found the problem and landed a fix

NachoSoto commented 6 days ago

Thanks! Any idea when that will ship! We're currently ignoring this file but we'd like to re-enable it 🙏🏻

nicklockwood commented 6 days ago

I'll try to roll it out asap - within the next few days I would think

nicklockwood commented 1 day ago

@NachoSoto fixed in 0.54.5