Giter VIP home page Giter VIP logo

sdkman-candidates'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-candidates's People

Contributors

brunoroemers avatar dvdkruk avatar eddumelendez avatar helpermethod avatar johnshajiang avatar marc0der avatar msatina avatar poad avatar tonycody avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sdkman-candidates's Issues

Java 6 install fails on OSX High Sierra

There is an updated DMG binary from Apple that needs to be used for current OSX versions:

https://support.apple.com/downloads/java-6

Specifically, I'm looking for this one to be used with High Sierra: Java for OS X 2017-001 -- http://support.apple.com/downloads/DL1572/en_US/javaforosx.dmg

Whereas, SDKman is trying to install this one Java for OS X 2015-001 which is no longer correct.

sdk install java 6u65-apple

Apple requires that you agree with the Apple Software License Agreement
prior to installation.

The license agreement can be found in PDF format here:

  http://images.apple.com/legal/sla/docs/JavaForOSX.pdf

Do you agree to the terms of this agreement? (Y/n): Y

Downloading: java 6u65-apple

In progress...

######################################################################## 100.0%
Binary validation passed...
Repackaging Java 6u65...
Attaching to the DMG...
Mounting DMG as Volume...
Volume(s) mounted successfully
Installing PKG inside DMG...
installer: Cannot install on volume / because it is disabled.
installer: A newer version of this package is already installed.
Copy JDK Home to temp folder...
cp: /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home: No such file or directory
unlink: /Users/bobby/.sdkman/tmp/out/java-6u65-apple/bundle: No such file or directory
ln: /Users/bobby/.sdkman/tmp/out/java-6u65-apple/bundle: No such file or directory
Preparing archive...

zip error: Nothing to do! (try: zip -qr --symlinks /Users/bobby/.sdkman/tmp/07ZqcYEhxVFCQ6emrnvUqHWv1dqrJrX3.zip . -i .)
Unmounting volume...
"/Volumes/Java for OS X 2015-001" unmounted successfully.
Done repackaging...
mv: rename /Users/bobby/.sdkman/tmp/07ZqcYEhxVFCQ6emrnvUqHWv1dqrJrX3.zip to /Users/bobby/.sdkman/archives/java-6u65-apple.zip: No such file or directory
unzip:  cannot find or open /Users/bobby/.sdkman/archives/java-6u65-apple.zip, /Users/bobby/.sdkman/archives/java-6u65-apple.zip.zip or /Users/bobby/.sdkman/archives/java-6u65-apple.zip.ZIP.
rm: /Users/bobby/.sdkman/archives/java-6u65-apple.zip: No such file or directory

Stop! The archive was corrupt and has been removed! Please try installing again.

Bug: sdk list java does not show Eclipse Adoptium / AdoptOpenJDK JDKs

Bug report

sdk list java with SDKMAN 5.12.4 on macOs Big Sur does not show the Eclipse Adoptium / AdoptOpenJDK JDKs. Even installed JDKs are not shown.

Output of sdk list java:

~ ❯ sdk list java | cat                                                                                                                                                                                                                                                      4s
================================================================================
Available Java Versions
================================================================================
 Vendor        | Use | Version      | Dist    | Status     | Identifier
--------------------------------------------------------------------------------
 Corretto      |     | 17.0.0.35.2  | amzn    |            | 17.0.0.35.2-amzn
               |     | 17.0.0.35.1  | amzn    |            | 17.0.0.35.1-amzn
               |     | 16.0.2.7.1   | amzn    |            | 16.0.2.7.1-amzn
               |     | 11.0.12.7.2  | amzn    |            | 11.0.12.7.2-amzn
               |     | 8.302.08.1   | amzn    |            | 8.302.08.1-amzn
 GraalVM       |     | 21.2.0.r16   | grl     |            | 21.2.0.r16-grl
               |     | 21.2.0.r11   | grl     |            | 21.2.0.r11-grl
               |     | 20.3.3.r11   | grl     |            | 20.3.3.r11-grl
               |     | 19.3.6.r11   | grl     |            | 19.3.6.r11-grl
 Java.net      |     | 18.ea.15     | open    |            | 18.ea.15-open
               |     | 18.ea.2.lm   | open    |            | 18.ea.2.lm-open
               |     | 17           | open    |            | 17-open
               |     | 17.ea.3.pma  | open    |            | 17.ea.3.pma-open
               |     | 16.0.2       | open    |            | 16.0.2-open
               |     | 11.0.2       | open    |            | 11.0.2-open
 Liberica      |     | 17.0.0.fx    | librca  |            | 17.0.0.fx-librca
               |     | 17.0.0       | librca  |            | 17.0.0-librca
               |     | 16.0.2.fx    | librca  |            | 16.0.2.fx-librca
               |     | 16.0.2       | librca  |            | 16.0.2-librca
               |     | 11.0.12.fx   | librca  |            | 11.0.12.fx-librca
               |     | 11.0.12      | librca  |            | 11.0.12-librca
               |     | 8.0.302.fx   | librca  |            | 8.0.302.fx-librca
               |     | 8.0.302      | librca  |            | 8.0.302-librca
 Liberica NIK  |     | 21.2         | nik     |            | 21.2-nik
 Microsoft     |     | 16.0.2.7.1   | ms      |            | 16.0.2.7.1-ms
               |     | 11.0.12.7.1  | ms      |            | 11.0.12.7.1-ms
 SapMachine    |     | 17           | sapmchn |            | 17-sapmchn
               |     | 16.0.2       | sapmchn |            | 16.0.2-sapmchn
               |     | 11.0.12      | sapmchn |            | 11.0.12-sapmchn
 Semeru        |     | 16.0.2       | sem     |            | 16.0.2-sem
               |     | 11.0.12      | sem     |            | 11.0.12-sem
               |     | 8.0.302      | sem     |            | 8.0.302-sem
 Temurin       |     | 16.0.2       | tem     |            | 16.0.2-tem
               |     | 11.0.12      | tem     |            | 11.0.12-tem
               |     | 8.0.302      | tem     |            | 8.0.302-tem
 Trava         |     | 11.0.9       | trava   |            | 11.0.9-trava
               |     | 8.0.232      | trava   |            | 8.0.232-trava
 Zulu          |     | 17.0.0       | zulu    |            | 17.0.0-zulu
               |     | 17.0.0.fx    | zulu    |            | 17.0.0.fx-zulu
               |     | 16.0.2       | zulu    |            | 16.0.2-zulu
               |     | 16.0.2.fx    | zulu    |            | 16.0.2.fx-zulu
               |     | 11.0.12      | zulu    |            | 11.0.12-zulu
               |     | 11.0.12.fx   | zulu    |            | 11.0.12.fx-zulu
               |     | 8.0.302      | zulu    |            | 8.0.302-zulu
               |     | 8.0.302.fx   | zulu    |            | 8.0.302.fx-zulu
               |     | 7.0.312      | zulu    |            | 7.0.312-zulu
================================================================================
Use the Identifier for installation:

    $ sdk install java 11.0.3.hs-adpt
================================================================================

Installed JDKS:

~ ❯ ls -1 .sdkman/candidates/java
8.0.292.hs-adpt/
11.0.11.hs-adpt/
16.0.1.hs-adpt/
current -> 16.0.1.hs-adpt/

To reproduce

Run sdk list java with SDKMAN 5.12.4 on macOs Big Sur

System info

  • SDKMAN 5.12.4
  • macOs Big Sur 11.5.2
  • zsh 5.8 (x86_64-apple-darwin19.6.0)

Jenkins Grails plugin does not list lastest versions of Grails

@stigmelling commented on Wed Apr 19 2017

Looks like the Grails backend crawler (https://github.com/jenkinsci/backend-crawler/blob/master/grails.groovy) uses the list provided by http://api.sdkman.io/candidates/grails

The latest versions 3.2.8 and 2.5.6 are missing from the list.


@marc0der commented on Fri Apr 21 2017

It turns out that this api endpoint was no longer being used by the cli client, so was subsequently orphaned. I wasn't aware that it was still being used by anyone. We have since done a lot of work to support multi platform candidates, which means that versions can vary between platforms (as they do for java). That said, Grails is a universal candidate that has consistent versions for all platforms.

I would need to implement a new endpoint specifically for this purpose that complies with out new API schema. I'll see what I can do to address this and report back here.

Bug: Sorting Is Incorrect In Some Instances

Bug report

For GraalVM, version 21.0.0.r11 is ranked before 21.0.0.2.r11, which was released after it. I'm guessing the sorting algorithm is having an issue with the extra .2., which should indicate recency but isn't being interpreted that way.

GraalVM       |     | 21.0.0.r11   | grl     | local only | 21.0.0.r11-grl
               |     | 21.0.0.2.r11 | grl     |            | 21.0.0.2.r11-grl
               |     | 21.0.0.2.r8  | grl     |            | 21.0.0.2.r8-grl

To reproduce

Simply sdk list java.

System info
Latest OSX.

Update Leiningen to 2.8.1

Please update Lein to 2.8.1 : https://github.com/technomancy/leiningen/releases

sdkman still shows the very old 2.7.1 (almost 2 years old):

➜  ~ sdk l leiningen
================================================================================
Available Leiningen Versions
================================================================================
 > * 2.7.1                                                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                

================================================================================
+ - local version
* - installed
> - currently in use
================================================================================

Thank you.

New Java view doesn't show local versions

With the latest updates on improving candidates handling, the list view doesn't show local versions anymore, previously marked with "+". They are still usable but don't show up in the list.

Maybe it can be added at the end like another vendor?

================================================================================
Available Java Versions
================================================================================
 Vendor        | Use | Version      | Dist    | Status     | Identifier
--------------------------------------------------------------------------------
 ...
 java.net      |     | 14.ea.1      | open    |            | 14.ea.1-open        
               |     | 13.ea.25     | open    |            | 13.ea.25-open       
               |     | 12.0.1       | open    |            | 12.0.1-open         
               |     | 11.0.2       | open    |            | 11.0.2-open         
               |     | 10.0.2       | open    |            | 10.0.2-open         
               |     | 9.0.4        | open    |            | 9.0.4-open          
local          |     |              |         | installed  | <name-you-used>
               |     |              |         | installed  | <name-you-used>

sdk list java --all

I wanted to be able to list all java version by adding the "--all" option as was discussed already on the interwebs.

sdk list java --all

This would ignore the visible flag. I figured I'd give it a try, but then found out Sdkman is written in scala, and that is very out of my comfort zone. But I've analyzed what needs to be done:

  1. sdkman_list.sh __sdkman_list_versions needs to recognize the --all and put that into the querystring
  2. JavaListController needs to get "all" as a parameter, and decide to either call findAllVisibleVersionsByCandidatePlatform or findAllVersionsByCandidatePlatform. Oh, and a change to routes.

That would have been all if not for that the repo is sneeky forwarding findAllVersionsByCandidatePlatform to findAllVisibleVersionsByCandidatePlatform, so:

  1. VersionsController and VersionsListController needs to call findAllVisibleVersionsByCandidatePlatform instead of findAllVersionsByCandidatePlatform
  2. And then finall VersionsRepo.findAllVersionsByCandidatePlatform needs to copy the query of findAllVisibleVersionsByCandidatePlatform without the visible parameter.

I've even made the changes for 2, 3 and 4. Well, that is, they compile. But I'm so out of my league... I have no idea how to test it, make sure that the candidates uses the new repo. Given the amount of effort the change is, and the amount of effort it would take me to complete it... That is quite out of balance.

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.