Failed to build on Ubuntu 16.04
yurii-voievodin opened this issue · 4 comments
Hello! I'm trying to build project with "Jobs" package on my DigitalOcean droplet (Ubuntu 16.04).
And I'm getting this errors:
.build/checkouts/Jobs.git--5850231031452440998/Sources/Jobs.swift:269:5: warning: @discardableResult declared on a function returning Void is unnecessary static func schedule(
.build/checkouts/Jobs.git--5850231031452440998/Sources/Jobs.swift:279:12: warning: @discardableResult declared on a function returning Void is unnecessary public static func schedule(
.build/checkouts/Jobs.git--5850231031452440998/Sources/Jobs.swift:289:5: warning: @discardableResult declared on a function returning Void is unnecessary static func schedule(
.build/checkouts/Jobs.git--5850231031452440998/Sources/Shell.swift:8:25: error: use of undeclared type 'Task' typealias Process = Task
Swift version:
swift --version
Swift version 3.1 (swift-3.1-RELEASE)
Target: x86_64-unknown-linux-gnu
Installed via swiftenv
swiftenv --version
swiftenv 1.2.1
I am suffering from the same, using Heroku cedar14 (Ubuntu 14.04) it fails with the same error.
It looks like Task
is not available on Swift 3.1 on Linux.
Turns out this has been fixed already. In swift 3.1 Task
has been renamed to Process
, so the typealias
under Shell.swift
is no longer necessary for swift 3.1
This has been merged and is part of Job
's release 1.0.0-beta.1
.
@yura-voevodin in order to use this version, update your Package.swift
with:
.Package(url: "https://github.com/BrettRToomey/Jobs.git", "1.0.0-beta.1")
and run swift package update
.
I hope that solves it for you too.
@BrettRToomey I believe this issue can be closed.
Oh, thanks. I was about to mention that I merged a PR a while ago that handles this. As @Eddpt kindly pointed out, make sure to update your tag. When Vapor 2 releases a 1.0.0
tag will be created/