tc39 / eshost

A uniform wrapper around a multitude of ECMAScript hosts. CLI: https://github.com/bterlson/eshost-cli
Other
142 stars 36 forks source link

macOS M1: eshost --conifgure-jsvu searches ~/.jsvu/*, but jsvu setup binaries in ~/.jsvu/bin/* #143

Open LumaKernel opened 1 week ago

LumaKernel commented 1 week ago

I just followed the instruction written in PR template of https://github.com/tc39/ecma262, but it seems it's outdated.

> jsvu
📦 jsvu v2.4.0 — the JavaScript engine Version Updater 📦
? What is your operating system? macOS M1 64-bit
? Which JavaScript engines would you like to install? (Press <space> to select, <a> to toggle all, <i> to invert selection)Chakra/ChakraCore, GraalJS, Hermes, JavaScriptCore, QuickJS, Spide
rMonkey, V8, XS
❯ Finding the latest Chakra version…
âś– RequestError: getaddrinfo ENOTFOUND chakratestx.file.core.windows.net
âś” Found latest GraalJS version: val-24.0.2.
❯ Predicting URL…
âś– Error: GraalJS does not offer precompiled mac64arm binaries.
âś” Found latest Hermes version: v0.11.0.
âś” URL: https://github.com/facebook/hermes/releases/download/v0.11.0/hermes-cli-darwin-v0.11.0.tar.gz
âś” Download completed.
❯ Extracting…
Installing binary to ~/.jsvu/engines/hermes/hermes…
Installing symlink at ~/.jsvu/bin/hermes pointing to ~/.jsvu/engines/hermes/hermes…
Installing binary to ~/.jsvu/engines/hermes/hermes-compiler…
Installing symlink at ~/.jsvu/bin/hermes-compiler pointing to ~/.jsvu/engines/hermes/hermes-compiler…
âś” Extraction completed.
âś” Testing completed.
✔ Hermes v0.11.0 has been installed! 🎉
âś” Found latest JavaScriptCore version: v283330.
âś” URL: https://s3-us-west-2.amazonaws.com/minified-archives.webkit.org/mac-sonoma-x86_64%20arm64-release/283330@main.zip
âś” Download completed.
❯ Extracting…
Installing library to ~/.jsvu/engines/javascriptcore/JavaScriptCore.framework/Headers…
Installing library to ~/.jsvu/engines/javascriptcore/JavaScriptCore.framework/Helpers…
Installing library to ~/.jsvu/engines/javascriptcore/JavaScriptCore.framework/JavaScriptCore…
Installing library to ~/.jsvu/engines/javascriptcore/JavaScriptCore.framework/JavaScriptCore.tbd…
Installing library to ~/.jsvu/engines/javascriptcore/JavaScriptCore.framework/Modules…
Installing library to ~/.jsvu/engines/javascriptcore/JavaScriptCore.framework/PrivateHeaders…
Installing library to ~/.jsvu/engines/javascriptcore/JavaScriptCore.framework/Resources…
Installing library to ~/.jsvu/engines/javascriptcore/JavaScriptCore.framework/Versions…
Installing binary to ~/.jsvu/engines/javascriptcore/javascriptcore…
Installing wrapper script to ~/.jsvu/bin/javascriptcore…
âś” Extraction completed.
âś” Testing completed.
✔ JavaScriptCore v283330 has been installed! 🎉
âś” Found latest QuickJS version: v0.5.0.
âś” URL: https://github.com/quickjs-ng/quickjs/releases/download/v0.5.0/qjs-darwin
âś” Download completed.
❯ Extracting…
Installing binary to ~/.jsvu/engines/quickjs/qjs…
Installing symlink at ~/.jsvu/bin/qjs pointing to ~/.jsvu/engines/quickjs/qjs…
Installing wrapper script to ~/.jsvu/bin/quickjs…
âś” Extraction completed.
âś” Testing completed.
✔ QuickJS v0.5.0 has been installed! 🎉
âś” Found latest SpiderMonkey version: v131.0b3.
âś” URL: https://archive.mozilla.org/pub/firefox/releases/131.0b3/jsshell/jsshell-mac.zip
âś” Download completed.
❯ Extracting…
Installing library to ~/.jsvu/engines/spidermonkey/libmozglue.dylib…
Installing library to ~/.jsvu/engines/spidermonkey/libnss3.dylib…
Installing binary to ~/.jsvu/engines/spidermonkey/spidermonkey…
Installing symlink at ~/.jsvu/bin/spidermonkey pointing to ~/.jsvu/engines/spidermonkey/spidermonkey…
Installing symlink at ~/.jsvu/bin/sm pointing to ~/.jsvu/engines/spidermonkey/spidermonkey…
âś” Extraction completed.
âś” Testing completed.
✔ SpiderMonkey v131.0b3 has been installed! 🎉
âś” Found latest V8 version: v13.0.184.
âś” URL: https://storage.googleapis.com/chromium-v8/official/canary/v8-mac-arm64-rel-13.0.184.zip
âś” Download completed.
❯ Extracting…
Installing library to ~/.jsvu/engines/v8/icudtl.dat…
Installing library to ~/.jsvu/engines/v8/snapshot_blob.bin…
Installing binary to ~/.jsvu/engines/v8/v8…
Installing wrapper script to ~/.jsvu/bin/v8…
âś” Extraction completed.
âś” Testing completed.
✔ V8 v13.0.184 has been installed! 🎉
âś” Found latest XS version: v4.9.5.
âś” URL: https://github.com/Moddable-OpenSource/moddable/releases/download/4.9.5/xst-mac64arm.zip
âś” Download completed.
❯ Extracting…
Installing binary to ~/.jsvu/engines/xs/xs…
Installing symlink at ~/.jsvu/bin/xs pointing to ~/.jsvu/engines/xs/xs…
âś” Extraction completed.
âś” Testing completed.
✔ XS v4.9.5 has been installed! 🎉

> npm list -g eshost
/usr/local/lib
└─┬ eshost-cli@9.0.0
  └── eshost@9.0.0

> eshost --configure-jsvu
Using config "/Users/luma/.eshost-config.json"
"ChakraCore" could not be configured because /Users/luma/.jsvu/chakra was not found.
"Hermes" could not be configured because /Users/luma/.jsvu/hermes was not found.
"JavaScriptCore" could not be configured because /Users/luma/.jsvu/jsc was not found.
"QuickJS" could not be configured because /Users/luma/.jsvu/quickjs was not found.
"SpiderMonkey" could not be configured because /Users/luma/.jsvu/sm was not found.
"V8" could not be configured because /Users/luma/.jsvu/v8 was not found.
"Moddable XS" could not be configured because /Users/luma/.jsvu/xs was not found.
No configured hosts

> eza --tree ~/.jsvu
/Users/luma/.jsvu
├── bin
│  ├── hermes -> /Users/luma/.jsvu/engines/hermes/hermes
│  ├── hermes-compiler -> /Users/luma/.jsvu/engines/hermes/hermes-compiler
│  ├── javascriptcore
│  ├── jsc
│  ├── qjs -> /Users/luma/.jsvu/engines/quickjs/qjs
│  ├── quickjs
│  ├── sm -> /Users/luma/.jsvu/engines/spidermonkey/spidermonkey
│  ├── spidermonkey -> /Users/luma/.jsvu/engines/spidermonkey/spidermonkey
│  ├── v8
│  └── xs -> /Users/luma/.jsvu/engines/xs/xs
├── engines
│  ├── hermes
│  │  ├── hermes
│  │  └── hermes-compiler
│  ├── javascriptcore
│  │  ├── javascriptcore
│  │  └── JavaScriptCore.framework
      <<  OMITTED >>
│  │        └── Current -> A
│  ├── quickjs
│  │  └── qjs
│  ├── spidermonkey
│  │  ├── libmozglue.dylib
│  │  ├── libnss3.dylib
│  │  └── spidermonkey
│  ├── v8
│  │  ├── icudtl.dat
│  │  ├── snapshot_blob.bin
│  │  └── v8
│  └── xs
│     └── xs
└── status.json

Thanks.

LumaKernel commented 1 week ago

Workaround for me (fish-shell)

echo ~/.jsvu/bin/* | string split ' ' | xargs -I{} ln -s {} ~/.jsvu/
# if you don't need quick js
# unlink ~/.jsvu/{qjs,quickjs}
LumaKernel commented 1 week ago

hmm, maybe it's not related to this repository, but only to https://github.com/bterlson/eshost-cli

LumaKernel commented 1 week ago

duplicated to https://github.com/bterlson/eshost-cli/issues/95