JohnSundell / Marathon

[DEPRECATED] Marathon makes it easy to write, run and manage your Swift scripts 🏃
MIT License
1.86k stars 78 forks source link

Marathon having issues to manage packages #113

Closed nestorlafon closed 7 years ago

nestorlafon commented 7 years ago

I've started using Marathon but I seem to be hitting the same problem again and again

~/w/l10n-android                                                               
▶ marathon update --verbose
🏃  Resolving latest major version for https://github.com/tadija/AEXML.git...
   Resolving latest major version for https://github.com/jatoben/CommandLine.git...
   Resolving latest major version for https://github.com/JohnSundell/Files.git...
   Updating packages...
   $ cd "/Users/nlafon/w/l10n-android/" && /usr/bin/env xcrun --sdk macosx swift --version
   Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42)
   Target: x86_64-apple-macosx10.9
   $ cd "/Users/nlafon/.marathon/Packages/Generated/" && /usr/bin/env xcrun --sdk macosx swift package --enable-prefetching update
   swift-package: error: unsatisfiable
💥  Failed to update packages
👉  Make sure you have write permissions to the folder '/Users/nlafon/.marathon/Packages/'

I did chmod -R a+w .marathon in me user home to make sure the path was writable. Swift package manager error is not very helpful either.

Installing a new package shows the same error but it is added in the Packages folder and marathon gets confused thinking it was installed

~/w/l10n-android                                                              ⍉
▶ marathon add https://github.com/JohnSundell/Unbox.git --verbose
🏃  Cloning https://github.com/JohnSundell/Unbox.git...
   $ cd "/Users/nlafon/.marathon/Packages/Temp/" && git clone https://github.com/JohnSundell/Unbox.git Clone -q

   Resolving latest major version for https://github.com/JohnSundell/Unbox.git...
   Updating packages...
   $ cd "/Users/nlafon/w/l10n-android/" && /usr/bin/env xcrun --sdk macosx swift --version
   Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42)
   Target: x86_64-apple-macosx10.9
   $ cd "/Users/nlafon/.marathon/Packages/Generated/" && /usr/bin/env xcrun --sdk macosx swift package --enable-prefetching update
   Fetching https://github.com/JohnSundell/Unbox.git
   swift-package: error: unsatisfiable
💥  Failed to update packages
👉  Make sure you have write permissions to the folder '/Users/nlafon/.marathon/Packages/'

~/w/l10n-android                                                              ⍉
▶ ls ~/.marathon/Packages/
AEXML       CommandLine Files       Generated   Temp        Unbox
~/w/l10n-android                                                               
▶ marathon list
📦  Packages
-----------
AEXML (https://github.com/tadija/AEXML.git)
CommandLine (https://github.com/jatoben/CommandLine.git)
Files (https://github.com/JohnSundell/Files.git)
Unbox (https://github.com/JohnSundell/Unbox.git)

📄  Scripts
----------
/Users/nlafon/w/l10n-android/l10n-android.swift

I bet is something in my environment messing it up, but I can't see it.

lf-araujo commented 7 years ago

Did you manage to go past this problem? I am running into identical problem in Ubuntu 17.04.

lf-araujo commented 7 years ago

@JohnSundell thansk for the amazing tool, I want to help. How can I help debugging this error? It seems to be affecting Linux, in my case Ubuntu.

JohnSundell commented 7 years ago

@nextorlg @lf-araujo Interesting.. what happens if you go into the ~/.marathon/Packages/Generated folder and run swift package update? Do you see the same error?

lf-araujo commented 7 years ago

Update

Sorry, I run the wrong command. Here is what happens when I run swift package update:

error: Package requires minimum Swift tools version 3.1.1. Current Swift tools version is 3.1.0

Well, maybe that is the culprit, an older Swift version. Will update and report back.

lf-araujo commented 7 years ago

Here is what I got with swift package update:

swift package update
Fetching https://github.com/JohnSundell/Files.git
Fetching https://github.com/JohnSundell/Xgen.git
Cloning https://github.com/JohnSundell/Files.git
Resolving https://github.com/JohnSundell/Files.git at 1.12.0
Cloning https://github.com/JohnSundell/Xgen.git
Resolving https://github.com/JohnSundell/Xgen.git at 1.0.1

And marathon is not running anymore in Swift 4:

marathon
marathon: symbol lookup error: marathon: undefined symbol: _TZvOs11CommandLine9argumentsGSaSS_
lf-araujo commented 7 years ago

... and after reinstalling marathon is all solved. The error disappears. You probably want to close the issue. Thanks for the help.

milseman commented 6 years ago

FWIW, I just hit this updating to the 9.3 beta. The solution was to swift package clean, rebuild, and reinstall (I also blew away ~/.marathon)