neonichu / cato Goto Github PK
View Code? Open in Web Editor NEWSwift scripts made easy with automatic dependency and Swift version management.
License: MIT License
Swift scripts made easy with automatic dependency and Swift version management.
License: MIT License
Hi neonichu
I installed all stuffs and it worked in the first time. After that, it always fail. Error like that:
no such module 'Chores'
import Chores
^
Have you any idea for that? Thanks
Hi!
Sorry to disturb you but I was trying to install cato
in order to make scriptiing easier and I found this error when running brew install cato
==> Installing cato from neonichu/formulae
cato: Unsatisfied dependency: cocoapods
Homebrew does not provide Ruby dependencies; install with:
gem install cocoapods
cato: Unsatisfied dependency: cocoapods-rome
Homebrew does not provide Ruby dependencies; install with:
gem install cocoapods-rome
Error: Unsatisfied requirements failed this build.
I think the issue is that brew tries to look for the gems in a different directory that where they are. I use RVM so for example cocoapods is in /Users/alex/.rvm/gems/ruby-2.2.1/bin/pod
. Also the ruby version that is being used via the PATH is /Users/alex/.rvm/rubies/ruby-2.2.1/bin/ruby
but I guess brew uses the system one?
I know that this is not related directly to cato but any help would be really appreciated ;)
Either:
import QueryKit ~> 1.0.0
or:
import QueryKit // ~> 1.0.0
What am I doing wrong?
Swift script:
#!/usr/bin/env cato
import AEXML
First run:
$ cato Script.swift
Analyzing dependencies
Downloading dependencies
Installing AEXML (3.0.0)
Generating Pods project
Skipping User Project Integration
Sending stats
Building frameworks
Built 1 frameworks
Copying 1 frameworks to `../../../../../.๐ฆ/Script/Rome`
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
Second run:
$ cato Script.swift
./Script.swift:3:8: error: module file's minimum deployment target is OS X v10.10: /Users/marc/.๐ฆ/Script/Rome/AEXML.framework/Modules/AEXML.swiftmodule/x86_64.swiftmodule
import AEXML
^
$ xcodebuild -version
Xcode 7.3.1
Build version 7D1014
$ xcrun --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
$ xcrun swift --version
Apple Swift version 2.2 (swiftlang-703.0.18.8 clang-703.0.31)
Target: x86_64-apple-macosx10.9
Podfile generated by cato:
platform :osx, '10.10'
plugin 'cocoapods-rome'
use_frameworks!
target 'cato' do
pod "AEXML"
end
Cocoapods is great, but a lot of libraries don't have a podspec/don't work through it. It would be nice to either pick carthage globally, fallback to carthage if rome fails, or somethings like this:
import Alamofire // Carthage
Just an idea :P
$ cato --export foo
should create an application bundle with all the required frameworks that can be redistributed.
This currently breaks for various little reasons, but since Rome has been updated, nothing major keeps this for being fixed.
I think this is right looking at the README:
$ cat test
#!/usr/bin/env cato
import URITemplate
let template = URITemplate(template: "test")
println("\(template)")
$ ./test
Usage: /usr/local/bin/cato [SWIFT-VERSION] SCRIPT
$ cato test
Usage: /usr/local/bin/cato [SWIFT-VERSION] SCRIPT
This is unfortunate, but since emoji characters are not permitted in the module_name. They have to differ making cato impossible to handle emoji pods.
https://github.com/nestproject/Padlock
import Padlock
I'd guess we should do the following:
import Padlock // pod '๐'
Example file as per README:
#!/usr/bin/env cato
import Chores
let result = >["xcodebuild", "-version"]
print(result.stdout)
After running it:
Analyzing dependencies
Downloading dependencies
Installing Chores (0.0.3)
Generating Pods project
Skipping User Project Integration
Building frameworks
[!] /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project Pods.xcodeproj -scheme Pods-cato -configuration Release -sdk macosx
Build settings from command line:
SDKROOT = macosx10.12
xcodebuild: error: 'Pods.xcodeproj' does not exist.
Any idea why?
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.