Giter VIP home page Giter VIP logo

Comments (4)

MaxDesiatov avatar MaxDesiatov commented on May 11, 2024 1

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.

RayZhao1998 avatar RayZhao1998 commented on May 11, 2024 1

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.

MaxDesiatov avatar MaxDesiatov commented on May 11, 2024

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.

RayZhao1998 avatar RayZhao1998 commented on May 11, 2024

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?

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.