naqvis / wasmer-crystal

WebAssembly runtime for Crystal
MIT License
93 stars 6 forks source link

Shard name mismatch #3

Closed noaheverett closed 2 years ago

noaheverett commented 2 years ago

When adding the shard to a crystal project via:

dependencies:
  wasmer-crystal:
    github: naqvis/wasmer-crystal

Gives the following error on install:

> shards install
Resolving dependencies
Fetching https://github.com/naqvis/wasmer-crystal.git
Error shard name (wasmer) doesn't match dependency name (wasmer-crystal)

To fix, the shard name has to be changed just wasmer to:

dependencies:
  wasmer:
    github: naqvis/wasmer-crystal

I think this may be due to the change at bdefa27 and possibly not updated elsewhere?

Thank you for your work on this shard, very useful!

naqvis commented 2 years ago

Thanks @noaheverett . Issue was happening due to missing release for last commit. I've bumped the version and made a new release.

noaheverett commented 2 years ago

Confirmed working via shards update, thank you @naqvis!

noaheverett commented 2 years ago

Whoops I spoke too soon with fresh project init

Error: Error: can't find file 'wasmer-crystal'

On a fresh project via crystal init app . then adding the wasmer-crystal dependency, shards install works correctly. However when requiring the shard it fails on compile with: Error: can't find file 'wasmer-crystal'

I can manually fix by re-naming the wasmer-crystal shard directory to wasmer and changing to require "wasmer"

It worked on my older project where wasmer was previously installed in the old directory and I didn't catch it, apologies!

naqvis commented 2 years ago

Thanks @noaheverett . Renamed shard back to wasmer, updated shard.yml and README to reflect the changes.