Code Monkey home page Code Monkey logo

alexaskillskit's Issues

Swift 4.x support

I was attempting to compile this with Swift 4.0.3 and got a strange compiler error. No code changes were identified by the Swift conversion tool. Here is the updated Package.swift for 4.x:

// swift-tools-version:4.0
import PackageDescription

let package = Package(
    name: "AlexaSkillsKit",
    targets: [
        .target(name: "AlexaSkillsKit", exclude: ["Samples"]),
        .testTarget(name: "AlexaSkillsKitTests", dependencies: ["AlexaSkillsKit"])
    ]
)

The compile error is the following after setting .swift-version to 4.0.3:

./build-linux.sh 
Compile Swift Module 'AlexaSkillsKit' (8 sources)
Compile Swift Module 'AlexaSkillsKitTests' (6 sources)
/app/Tests/AlexaSkillsKitTests/RequestDispatcherTests.swift:12:80: error: extra argument 'sessionAttributes' in call
        next(.success(standardResponse: StandardResponse(), sessionAttributes: [String: Any]()))
                                                                               ^~~~~~~~~~~~~~~
/app/Tests/AlexaSkillsKitTests/RequestDispatcherTests.swift:17:80: error: extra argument 'sessionAttributes' in call
        next(.success(standardResponse: StandardResponse(), sessionAttributes: [String: Any]()))
                                                                               ^~~~~~~~~~~~~~~
/app/Tests/AlexaSkillsKitTests/RequestDispatcherTests.swift:22:23: error: missing argument for parameter #1 in call
        next(.success())
                      ^
                      <#T#>
AlexaSkillsKit.Result:2:10: note: 'success' declared here
    case success(T)
         ^
/app/Tests/AlexaSkillsKitTests/RequestHandlerTests.swift:7:80: error: extra argument 'sessionAttributes' in call
        next(.success(standardResponse: StandardResponse(), sessionAttributes: [:]))
                                                                               ^~~
/app/Tests/AlexaSkillsKitTests/RequestHandlerTests.swift:11:80: error: extra argument 'sessionAttributes' in call
        next(.success(standardResponse: StandardResponse(), sessionAttributes: [:]))
                                                                               ^~~
/app/Tests/AlexaSkillsKitTests/RequestHandlerTests.swift:15:23: error: missing argument for parameter #1 in call
        next(.success())
                      ^
                      <#T#>
AlexaSkillsKit.Result:2:10: note: 'success' declared here
    case success(T)
         ^

I have seen similar errors in Swift 2->3 ports, but it was always a type mis-match in the code. The code looks correct in this case.

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.