dfinity / dfx-extensions

Source repo for DFX extensions binaries and metadata
Apache License 2.0
8 stars 5 forks source link

dfx extension install [url] not working #137

Open lastmjs opened 3 weeks ago

lastmjs commented 3 weeks ago

I'm no dfx 0.23.0-beta.0 and I'm trying to install the Azle extension like this:

dfx extension install https://raw.githubusercontent.com/demergent-labs/azle/main/dfx_extension/extension.json

I get this error:

Error: HTTP status client error (404 Not Found) for url (https://raw.githubusercontent.com/demergent-labs/azle/main/dfx_extension/dependencies.json)
lastmjs commented 3 weeks ago

Oops, just learning, I see the problem now

lastmjs commented 2 weeks ago

Actually I am reopening this. dfx extension install [url] really isn't working. I have been installing (and instructing others to install) our azle extension from the local file system for a long time now. This has been working very well. We have a command that users run that does this under-the-hood:

#!/bin/bash

DFX_CACHE_DIR="$(dfx cache show)"

if [ ! -d "$DFX_CACHE_DIR" ]; then
    dfx cache install
fi

mkdir -p "$DFX_CACHE_DIR/extensions/azle"
cp extension.json "$DFX_CACHE_DIR/extensions/azle/extension.json"

It's very simple and only requires the extension.json file. And the extension is working great.

But when I do something like dfx extension install https://raw.githubusercontent.com/demergent-labs/azle/wasmedge_improved_installation/dfx_extension/extension.json it requires much more. First it requires a dependencies.json, and now I'm getting this error:

Error: HTTP status client error (404 Not Found) for url (https://github.com/dfinity/dfx-extensions/releases/download/azle-v0.23.0/azle-x86_64-unknown-linux-gnu.tar.gz)

I don't see why all of this is necessary. Can't it work just like my local installation? I was hoping it would just retrieve the extension.json remotely and finish just like my local installation.

I don't want to have to maintain the dependencies.json nor create these tarballs if they're unnecessary, and they do not seem necessary for our use case.