Skip to content

List of Swift Kata to Update

hobovsky edited this page Sep 5, 2023 · 3 revisions

The following kata is not compatible with Swift 5.3:

  1. Assembler interpreter (part II)

Fails to compile with error:

swift: /home/buildnode/jenkins/workspace/oss-swift-5.3-package-linux-ubuntu-18_04/swift/include/swift/AST/Type.h:404: swift::CanType::CanType(swift::Type): Assertion `isActuallyCanonicalOrNull() && "Forming a CanType out of a non-canonical type!"' failed.
Stack dump:
0.	Program arguments: /usr/bin/swift -frontend -c /opt/runner/_XCTMain.swift /opt/runner/CodewarsObserver.swift -primary-file solution.swift main.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -I /usr/lib/swift/linux -Xcc -fblocks -module-name test -o /tmp/solution-abc80f.o 
1.	Swift version 5.3 (swift-5.3-RELEASE)
2.	While evaluating request IRGenSourceFileRequest(IR Generation for file "solution.swift")
3.	While evaluating request ExecuteSILPipelineRequest(Run pipelines { IRGen Preparation } on SIL for test.test)
4.	While running pass #96 SILModuleTransform "LoadableByAddress".

Most probably the incopatibility is a result of a bug in Swift compiler: https://github.com/codewars/runner/issues/261#issuecomment-1706867603 . The kata can be updated after updating version of Swift, or would have to have tests rewritten slightly.

Clone this wiki locally