Giter VIP home page Giter VIP logo

sdk's Introduction

SDKMAN! Golang CLI

Build Status

This project has been downgraded to a mere spike, the learnings of which will lead to the next phase of exploration of the CLI. We are also looking at Rust as an alternative implementation solution.

The current bash implementation is still completely fit for purpose and remains in full production use.

Living Documentation

SDKMAN's development is always driven by tests. More than that, we use Cucumber to describe the behaviour of the CLI in plain English. We do so using Cucumber features, all of which can be found under the features/ folder of this repo. These Features form a body of Living Documentation that evolves with the software implementation.

The Cucumber Features are backed by Step Definitions, snippets of matched code that are invoked in order as the Cucumber Feature are

Development

Prerequisites

Ensure that Go is installed on your system.

Optionally, install Godog for running the Cucumber specifications directly:

$ go get github.com/DATA-DOG/godog/cmd/godog

Running the tests

To run all tests using Go's builtin test support (unit and cukes):

$ cd path/to/the/repo/sdk
$ go test --godog.format=pretty

If Godog was installed earlier, run the Cucumber specs directly in isolation with the following command:

$ godog

Run

To kick the tyres before building:

$ go run sdk.go version

Build

To build and run the binary executable:

$ go build
$ ./sdk

sdk's People

Contributors

marc0der avatar objectx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sdk's Issues

Possible misuse of `ioutil.TempDir`

Don't hardcode /tmp. This will cause unexpected test failure on Windows.

# I'll check it on windows later. (at this time, no Windows station near me ๐Ÿ˜ข)

# Appended

Under windows environment ioutil.TempDir("/tmp", ... cause error
image

Feature Proposal: new Pull command

Text copied here for convenience from the pull.feature Cucumber spec. Please note, the feature file is the authoritave source so the text below may be out of date.

Versions of SDKMAN prior to 6.0.0 were very reliant on being connected to the internet. For most this has not been a problem, but for those with limited bandwidth or unreliable internet connectivity this has rendered the CLI unusable.

One of the steps that was taken previously was to introduce an offline mode, allowing the CLI to continue working even when no internet connection was present. The intent was to cause the CLI to degrade gracefully when:

  • no internet connectivity was available
  • when the sdk offline enable command was issued

Despite this being a noble effort, the implementation of this was troublesome due to the limitations of bash and curl. To date this functionality still has serious issues.

This leads us to re-evaluating our options given a blank canvas. Looking at tools like Debian's Apt and DVCS systems like Git, they all have functions that explicitly pull down remote state. In the case of Apt we have an apt update, in the case of Git we have git pull.

The proposal is to follow this line of thinking, preventing continual API access on every command. Instead, an explicit command such as sdk pull or sdk update should be issued in order to fetch remote state. If the sdk command has not been updated in while, it should warn the user that their local state is out of date.

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.