hyperledger-solang / solang-aqd

Apache License 2.0
2 stars 1 forks source link

Unable to install, no package called 'Aqd' on crates.io #18

Closed rickbeeloo closed 8 months ago

rickbeeloo commented 11 months ago

The Github says: cargo install --force --locked aqd to install this. However this fails with:

error: could not find `aqd` in registry `crates-io` with version `*`

Which makes sense as there is no pacakge called "Aqd" on crates.io.

How should this be installed?

tareknaser commented 11 months ago

Apologies for the confusion.

Currently, Aqd is not published on crates.io. You can still use it by building it from the source. Here are the steps:

  1. Clone the repository: git clone https://github.com/hyperledger/solang-aqd.git
  2. Navigate to the core crate directory: cd solang-aqd/crates/aqd-core
  3. Install the tool: cargo install --force --locked --path .

We plan to publish Aqd on crates.io soon. In the meantime, these steps should allow you to use it. Let us know if you encounter any issues or have further questions!

AlvinKuruvilla commented 8 months ago

When using these build instructions, the compiler fails to build the project because ahash doesn't have a stdsimd feature. When diving into this. I had to upgrade subxt = "0.34.0" and all the anyhow dependencies to anyhow = "1.0.80".

However, even after that, I still got the same error. I realized that, for some reason, deep in the dependency chain, the compiler was pulling hyper = 0.14.7, which also brought in the problematic ahash dependency. I removed -locked from your instructions to try and fix that. But now the compiler complains that error[E0599]: no method named opt_type found for reference &ReturnTypeSpec<PortableForm> in the current scope in the cargo-contract git dependency.

Apologies for the long-winded reply 😅

tareknaser commented 8 months ago

@AlvinKuruvilla

Thanks for reporting the issue

You shouldn't need to manually upgrade any dependencies. Could you give me the full error you get when you run cargo install --force --locked --path . without bumping any dependencies or removing Cargo.lock?

Also make sure you have libudev installed.

AlvinKuruvilla commented 8 months ago

Strangely enough, I had just wiped my Mac (for other reasons) and did a fresh clone and install with your instructions and it seems to have worked now 😅. If you would like any support to try and bring this package to crates.io, I would be more than happy to try and contribute to the effort in whatever little ways I can :).

I don't remember what rust version I was running with when I tried it before (pretty sure I was on stable), but now I was using stable-aarch64-apple-darwin unchanged - rustc 1.76.0 (07dca489a 2024-02-04)

tareknaser commented 8 months ago

I also run on mac but I tested on linux yesterday just to double check

If you would like any support to try and bring this package to crates.io, I would be more than happy to try and contribute to the effort

Thanks! We are still working on some issues to get solang-aqd to work for Solang compiled Polkadot smart contracts. once we got them solved, we will publish aqd to crates.io