JohnSundell/Marathon

Requires a minimum Swift tools version of 4.0.2

Opened this issue ยท 9 comments

I am using Marathon commit Nov 5th 6e01720

I have Swift 4.0.2 installed

Roberts-iMac:Code robertnash$ xcrun swift -version
Apple Swift version 4.0.2 (swiftlang-900.0.69.2 clang-900.0.38)
Target: x86_64-apple-macosx10.9
Roberts-iMac:Code robertnash$

Error running install of testdrive.git

Roberts-iMac:Code robertnash$ sudo marathon install johnsundell/testdrive
๐Ÿƒ  Cloning https://github.com/johnsundell/testdrive.git...
   Compiling script...
๐Ÿ’ฅ  Failed to compile script
Roberts-iMac:Code robertnash$ sudo marathon install johnsundell/testdrive --verbose
Password:
๐Ÿƒ  Cloning https://github.com/johnsundell/testdrive.git...
   $ cd "/Users/robertnash/.marathon/Scripts/Temp/https:--github.com-johnsundell-testdrive.git/" && git clone https://github.com/johnsundell/testdrive.git clone -q
   
   $ cd "/Users/robertnash/.marathon/Scripts/Cache/-Users-robertnash-.marathon-Scripts-Temp-https:--github.com-johnsundell-testdrive.git-clone-Sources-TestDrive/" && readlink OriginalFile
   /Users/robertnash/.marathon/Scripts/Temp/https:--github.com-johnsundell-testdrive.git/clone/Sources/TestDrive.swift
   $ cd "/Users/robertnash/Code/" && /usr/bin/env xcrun --sdk macosx swift --version
   Apple Swift version 4.0.2 (swiftlang-900.0.69.2 clang-900.0.38)
   Target: x86_64-apple-macosx10.9
   Compiling script...
   $ cd "/Users/robertnash/.marathon/Scripts/Cache/-Users-robertnash-.marathon-Scripts-Temp-https:--github.com-johnsundell-testdrive.git-clone-Sources-TestDrive/" && /usr/bin/env xcrun --sdk macosx swift build -C /Users/robertnash/.marathon/Scripts/Cache/-Users-robertnash-.marathon-Scripts-Temp-https:--github.com-johnsundell-testdrive.git-clone-Sources-TestDrive/ --enable-prefetching -c release -Xswiftc -static-stdlib
   warning: '--chdir/-C' option is deprecated; use '--package-path' instead
   error: package at '/Users/robertnash/.marathon/Scripts/Cache/-Users-robertnash-.marathon-Scripts-Temp-https:--github.com-johnsundell-testdrive.git-clone-Sources-TestDrive' **requires a minimum Swift tools version of 4.0.2 (currently 4.0.0)**
๐Ÿ’ฅ  Failed to compile script

Heyo! I have the same problem but with swift 4.0.3, while creating a script.

> xcrun swift -version
Apple Swift version 4.0.3 (swiftlang-900.0.72 clang-900.0.38)
Target: x86_64-apple-macosx10.9 
> marathon create Test --verbose
๐Ÿฃ  Created script at Test.swift
๐Ÿƒ  $ cd "/Users/francisco.amado/.marathon/Scripts/Cache/-Users-francisco.amado-dev-Test/.build/" && ln -s "/Users/francisco.amado/.marathon/Packages/Generated/.build/checkouts/" "checkouts"

   $ cd "/Users/francisco.amado/.marathon/Scripts/Cache/-Users-francisco.amado-dev-Test/.build/" && ln -s "/Users/francisco.amado/.marathon/Packages/Generated/.build/repositories/" "repositories"

   $ cd "/Users/francisco.amado/.marathon/Scripts/Cache/-Users-francisco.amado-dev-Test/.build/" && ln -s "/Users/francisco.amado/.marathon/Packages/Generated/.build/workspace-state.json" "workspace-state.json"

   $ cd "/Users/francisco.amado/.marathon/Scripts/Cache/-Users-francisco.amado-dev-Test/" && ln -s "/Users/francisco.amado/dev/Test.swift" "OriginalFile"

   $ cd "/Users/francisco.amado/.marathon/Scripts/Cache/-Users-francisco.amado-dev-Test/" && readlink OriginalFile
   /Users/francisco.amado/dev/Test.swift
   $ cd "/Users/francisco.amado/dev/" && /usr/bin/env xcrun --sdk macosx swift --version
   Apple Swift version 4.0.3 (swiftlang-900.0.72 clang-900.0.38)
   Target: x86_64-apple-macosx10.9
   $ cd "/Users/francisco.amado/.marathon/Scripts/Cache/-Users-francisco.amado-dev-Test/" && /usr/bin/env xcrun --sdk macosx swift package generate-xcodeproj
   error: package at '/Users/francisco.amado/.marathon/Scripts/Cache/-Users-francisco.amado-dev-Test' requires a minimum Swift tools version of 4.0.3 (currently 4.0.0)
๐Ÿ’ฅ  Failed to open script 'Test' for editing
๐Ÿ‘‰  Make sure that it exists and that its file is readable

I had the same problem which disappeared after deleting the ~/.marathon/ folder!

This is a known problem, please check out #137 for a solution.

Anyone resolved it yet? Nothing works for me...

I also have this problem with Xcode 9.2, swift 4.0.3, tools 4.0.0-dev.

run below cmd to change the tools-version for current package:
swift package tools-version --set-current

When I try that I get an error:

$ swift package tools-version --set-current
error: root manifest not found
orta commented

A release of marathon got shipped for Swift 4.2 - https://github.com/JohnSundell/Marathon/releases/tag/3.1.0

Which I think should address this.

Issue resolved in Marathon 3.1.0