nicklockwood / SwiftFormat

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

Console errors after update to 0.49.10 #1201

Closed katovBash closed 2 years ago

katovBash commented 2 years ago

**After release 0.49.10 there was appeared error: make: * [format] Error 70.

In console we can find: error: Unexpected end of file at 24:77 error: Unexpected end of file at 20:30 error: Expected end of scope on line 218 and etc. in different files.

In xCode all is fine. Its build and all brackets are in current place :)

nicklockwood commented 2 years ago

Hi, can you provide the file that produces this error? You can send it privately to support @ charcoaldesign.co.uk if you'd prefer not to make it public.

katovBash commented 2 years ago

One of them:

error: Unexpected end of file at 20:30 in /Users/.../Actions.swift.

// MARK: - Actions

public enum Actions: Hashable, Decodable { case redirect(URL?) case refresh case back

// MARK: Public

public var redirectURL: URL? { let path = /Self.redirect return path.extract(from: self)?.flatMap { $0 } } }

extension Core_Action_ComposedAction { public var uiAction: Actions { switch component { case let .actionRedirect(redirect): return Actions.redirect(URL(string: redirect.link.value)) case .actionBack: return .back default: return .refresh } } }

nicklockwood commented 2 years ago

Ah OK, so this is using the CasePaths library, right? I suspect it's related to https://github.com/nicklockwood/SwiftFormat/issues/1199

katovBash commented 2 years ago

All right. Ok, thanks)

nicklockwood commented 2 years ago

@katovBash fixed in 0.49.11

katovBash commented 2 years ago

@nicklockwood ver. 0.49.11 hmm... errors become lesser, but it still appeared Still error in file, that was clipped. Error: "error: Unexpected end of file at 20:30"

nicklockwood commented 2 years ago

@katovBash fixed in 0.49.12