Comments (4)
Yes, something like that, I personally prefer global
and local
subcommands as swiftenv
already uses them. And since carton
already picks up existing swiftenv
installation, maybe carton
should follow their convention to make it easier for developer to switch.
from carton.
TODO:
-
carton sdk versions
: show the list of installed sdks #21 -
carton sdk local
: show the local sdk version -
carton sdk local [version]
: set the local sdk version -
carton sdk global
: show the global sdk version -
carton sdk global [version]
: set the global sdk version
carton sdk versions
This command will look up sdk installed in ~/.carton/sdk
and ~/.swiftenv/versions
. It'll display which version is set as local and global.
carton sdk local
In a project, the sdk version is saved in .swift-env
. So we just need to look up the current local sdk version saved in .swift-env
. Also when we want to set the local version of sdk, we just need to save the version to .swift-env
.
carton sdk global
swiftenv
save the global version of swift in ~/.swiftenv/version
, maybe we can save our global version in ~/.carton/swift-version
too.
from carton.
Hi @RayZhao1998, it is absolutely reasonable, thank you for creating this issue! One point that needs to be resolved is how carton sdk use
would work. Would it record that version in the .swift-version
file? A lot of toolchain managers allow specifying a "global" and a "local" toolchain, so maybe instead of carton sdk use
it would be carton sdk global
and carton sdk local
? IDK, just spitballing here, mostly looking for a consensus on what the best user experience would be 🙂
from carton.
A lot of toolchain managers allow specifying a "global" and a "local" toolchain, so maybe instead of
carton sdk use
it would becarton sdk global
andcarton sdk local
?
It make sense! we can use a flag such as -g
representing "global", just like npm install -g
or just use "global" in the command like yarn global add
.
from carton.
Related Issues (20)
- Publish `carton` as npm package HOT 4
- `carton dev` stops rebuilding/reloading after error
- Pick up `index.html` from resources of the main target in `Package.swift`
- Re-read supplied `index.html` on updates
- Automatically generate Swift bindings for TypeScript declarations HOT 5
- Update `carton init` template to allow `carton test` without modification
- Add `carton shell` command making SwiftWasm toolchain the default in forked shell
- `carton test` should fail if crashing during `_initialize`
- Fatal Error HOT 8
- `brew install swiftwasm/tap/carton` installs old version HOT 4
- compiler error, [-Wimplicit-function-declaration] HOT 5
- Docker not working HOT 1
- Support Ubuntu 22.04 LTS for toolchain downloader
- Error: Invalid version on Ubuntu 22.04 HOT 4
- ProcessInfo is empty when invoking `carton test` HOT 4
- Mismatched Swift Versions HOT 2
- Customize watcher directory
- Xcode 15 breaks `carton` build process HOT 4
- Missing `swift`- prefix from SDKs HOT 1
- Facing swift compiler version issue on` /root/.carton/sdk/wasm-5.7.1-RELEASE/usr/bin/swift`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carton.