chrisdhaan / CDMarkdownKit

An extensive Swift framework providing simple and customizable markdown parsing.
MIT License
254 stars 66 forks source link

CDMarkdownKit build failed on XCode 11.4 #21

Closed Aglezabad closed 4 years ago

Aglezabad commented 4 years ago

What did you do?

I've upgraded XCode from 11.3.1 to 11.4

What did you expect to happen?

CDMarkdownKit built with successful results.

What happened instead?

Build failed. "Switch must be exhaustive on line 301 of CDMarkdownLabel.swift file."

Captura de pantalla 2020-03-25 a las 11 05 31

CDMarkdownKit Environment

CDMarkdownKit version: 1.2.1 Xcode version: 11.4 Swift version: 5 Platform(s) running CDMarkdownKit: iOS 13.3.1 macOS version running Xcode: Catalina 10.15.3 (19D76)

Best regards.

kunass2 commented 4 years ago

Yes, I agree with the issue. Waiting for fix.

arusa commented 4 years ago

I get the same error. That's very strange... according to UITouch.Phase documentation there are no more states available, but maybe Swift still needs a "default" case because nevertheless those touch phase constants are just integers and not all integers are covered by the switch statement?

I have solved the problem temporarily by changing the last few lines to:

        case .stationary:
            break
        default:
            break
        }
arusa commented 4 years ago

OMG there are already better solutions available as pull request...

https://github.com/chrisdhaan/CDMarkdownKit/pull/23/commits/42d6ce2ac2f24f3e65532dc1944cc1b47a7ef85a

chrisdhaan commented 4 years ago

@Aglezabad @kunass2 @arusa a new release has been made with this fix. Closing issue.