choefele / alexaskillskit Goto Github PK
View Code? Open in Web Editor NEWSwift library to develop custom Alexa Skills
License: MIT License
Swift library to develop custom Alexa Skills
License: MIT License
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.