Giter VIP home page Giter VIP logo

sdkman-cli-native'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

sdkman-cli-native's People

Contributors

aalmiray avatar dependabot[bot] avatar helpermethod avatar marc0der 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  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

sdkman-cli-native's Issues

Bug: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found

Bug report

just updated sdkman via cli today (2023-06-08) and now get the following error:

/****/.sdkman/libexec/help: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /****/.sdkman/libexec/help)

To reproduce

On Linux Mint 19.3 install/update sdkman

System info

$ uname -a
Linux oni 5.4.0-146-generic sdkman/sdkman-cli#163~18.04.1-Ubuntu SMP Mon Mar 20 15:02:59 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description:    Linux Mint 19.3 Tricia
Release:        19.3
Codename:       tricia

$ sdk version
/home/fredo/.sdkman/libexec/version: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /home/fredo/.sdkman/libexec/version)

$ cat /****/.sdkman/var/version
5.18.1

$ cat /****/.sdkman/var/version_native 
0.1.3

Resolution Proposal

do a static link of your binaries against musl to make them distro/version agnostic.

Bug: 404s for Exotic native cli in install script

Not sure if this is the right place, but this repo has most eyes on it.

Using the sdkman install script (https://get.sdkman.io/) - I am running this on s390x machine and it seems the Exotic version is missing as Im getting 404s this used to work fine.

https://api.sdkman.io/2/broker/download/native/install/0.0.15/Exotic

curl: (22) The requested URL returned error: 404

'curl --fail --location --progress-bar "$download_url" > "$sdkman_zip_file"': command failed with exit code 22.

Performing sdk uninstall causes "thread 'main' panicked"

I am running sdkman in Cygwin to manage different java versions.

When I run sdk uninstall java 17.0.2-tem I get the following output.

thread 'main' panicked at 'panic! the candidates file is missing', src\lib.rs:44:14

If I run RUST_BACKTRACE=full sdk uninstall java 17.0.7-tem I get the following.

thread 'main' panicked at 'panic! the candidates file is missing', src\lib.rs:44:14
stack backtrace:
0: 0x7ff6a76af622 -
1: 0x7ff6a76c2d1b -
2: 0x7ff6a76abdda -
3: 0x7ff6a76af36b -
4: 0x7ff6a76b15f9 -
5: 0x7ff6a76b127b -
6: 0x7ff6a76b1e90 -
7: 0x7ff6a76b1c1e -
8: 0x7ff6a76b003f -
9: 0x7ff6a76b18d0 -
10: 0x7ff6a76c9b05 -
11: 0x7ff6a76c20e0 -
12: 0x7ff6a76c208b -
13: 0x7ff6a76c9ac9 -
14: 0x7ff6a764e4e4 -
15: 0x7ff6a7647136 -
16: 0x7ff6a764b456 -
17: 0x7ff6a764c2fc -
18: 0x7ff6a76a6b7e -
19: 0x7ff6a764a2dc -
20: 0x7ff6a76c7a90 -
21: 0x7ff9441f7614 - BaseThreadInitThunk
22: 0x7ff9454a26a1 - RtlUserThreadStart

I don't know when this started since this is the first time I've tried to uninstall a version.

Before attempting the uninstall I had just upgraded to the last version (SDKMAN_VERSION="5.18.1" and SDKMAN_NATIVE_VERSION="0.2.2", according to the current content at https://get.sdkman.io/). I also tried sdk selfupdate force, and started a new terminal, to no avail.

Perhaps a related issue: running sdk version (or RUST_BACKTRACE=full sdk version) returns no output at all (process exit code is 78).

New 0.0.22 release breaks sdkman on Ubuntu 20.04

It looks like it was compiled against Glibc >= 2.32 but Ubuntu 20.04 only has 2.31...

... is this intentional or is there any way to continue to support Glibc 2.31?

    packer-ubuntu.amazon-ebs.ubuntu_base: [env-versions] /home/runners/.sdkman/libexec/version: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/runners/.sdkman/libexec/version) 
    packer-ubuntu.amazon-ebs.ubuntu_base: [env-versions] /home/runners/.sdkman/libexec/version: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/runners/.sdkman/libexec/version) 
    packer-ubuntu.amazon-ebs.ubuntu_base: [env-versions] /home/runners/.sdkman/libexec/version: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/runners/.sdkman/libexec/version) 

Will there be a native version of `sdk`?

I use PowerShell as my main shell, so things like shell functions in bash don't really work so well. Is there a plan to have a replacement for the main sdk command in native format so I wouldn't need the shell functions?

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.