halcyon / asdf-java

A Java plugin for asdf-vm.
MIT License
468 stars 87 forks source link

Segfault in jq when list-all java #22

Closed sooheon closed 5 years ago

sooheon commented 5 years ago

I've tried fixes in #18, #14, and #21.

asdf list-all java /Users/skim/.asdf/plugins/java/bin/list-all: line 61: 14714 Segmentation fault: 11 jq '(.[].release_name) |= sub("jdk-";"adopt-openjdk-") | (.[].release_name) |= sub("^jdk";"adopt-openjdk-")' ${CACHE_DIR}/${i} > ${CACHE_DIR}/${i}.temp /Users/skim/.asdf/plugins/java/bin/list-all: line 61: 14716 Segmentation fault: 11 jq '(.[].release_name) |= sub("jdk-";"adopt-openjdk-") | (.[].release_name) |= sub("^jdk";"adopt-openjdk-")' ${CACHE_DIR}/${i} > ${CACHE_DIR}/${i}.temp /Users/skim/.asdf/plugins/java/bin/list-all: line 61: 14718 Segmentation fault: 11 jq '(.[].release_name) |= sub("jdk-";"adopt-openjdk-") | (.[].release_name) |= sub("^jdk";"adopt-openjdk-")' ${CACHE_DIR}/${i} > ${CACHE_DIR}/${i}.temp /Users/skim/.asdf/plugins/java/bin/list-all: line 61: 14720 Segmentation fault: 11 jq '(.[].release_name) |= sub("jdk-";"adopt-openjdk-") | (.[].release_name) |= sub("^jdk";"adopt-openjdk-")' ${CACHE_DIR}/${i} > ${CACHE_DIR}/${i}.temp /Users/skim/.asdf/plugins/java/bin/list-all: line 61: 14722 Segmentation fault: 11 jq '(.[].release_name) |= sub("jdk-";"adopt-openjdk-") | (.[].release_name) |= sub("^jdk";"adopt-openjdk-")' ${CACHE_DIR}/${i} > ${CACHE_DIR}/${i}.temp /Users/skim/.asdf/plugins/java/bin/list-all: line 61: 14724 Segmentation fault: 11 jq '(.[].release_name) |= sub("jdk-";"adopt-openjdk-") | (.[].release_name) |= sub("^jdk";"adopt-openjdk-")' ${CACHE_DIR}/${i} > ${CACHE_DIR}/${i}.temp amazon-corretto-11.0.3.7.1 amazon-corretto-8.212.04.2 azul-zulu-11.0.3 azul-zulu-12.0.1 azul-zulu-13.27.9 azul-zulu-7u222 azul-zulu-8.0.212

halcyon commented 5 years ago

@sooheon Please run the following 1 command and comment with the output: curl -s -L "https://api.adoptopenjdk.net/v2/info/releases/{openjdk13}?type=jdk" | jq '(.[].release_name)'

sooheon commented 5 years ago

curl -s -L "https://api.adoptopenjdk.net/v2/info/releases/{openjdk13}?type=jdk" | jq '(.[].release_name)' "jdk-13+33" "jdk-13+33_openj9-0.16.0"

halcyon commented 5 years ago

@sooheon Please join me at https://gitter.im/asdf-java/community

sooheon commented 5 years ago

Issue was homebrew's jq install (on Catalina). Downloading binary directly from jq site and putting it on path renamed to jq solves the issue.

sooheon commented 5 years ago

Test jq function with:

curl -s -L "https://api.adoptopenjdk.net/v2/info/releases/{openjdk13}?type=jdk" | jq '(.[].release_name) |= sub("jdk-";"adopt-openjdk-") | (.[].release_name) |= sub("^jdk";"adopt-openjdk-")'