asdf-community / asdf-crystal

Crystal plugin for the asdf version manager
https://github.com/asdf-vm/asdf
Apache License 2.0
75 stars 16 forks source link

Make libyaml dependency explicit #39

Closed hovsater closed 3 years ago

hovsater commented 3 years ago

It turns out the pre-built binaries for macOS depend on libyaml installed via Homebrew. This can verified using otool.

$ otool -L shards
/Users/kevinsjoberg/.asdf/installs/crystal/1.0.0/embedded/bin/shards:
    /opt/crystal/embedded/lib/libyaml-0.2.dylib (compatibility version 3.0.0, current version 3.4.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)
    /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)

This dependency isn't noted, causing issues for people trying to run shards without having libyaml installed. See #14. I've tried to make this dependency more clear by introducing the following changes:

Homebrew not being installed

$ asdf install crystal 0.36.1
Fail: pre-built releases of Crystal depend on Homebrew. Visit https://brew.sh to install it.

libyaml not being installed via Homebrew

$ asdf install crystal 0.36.1
Fail: libyaml from Homebrew is required, run 'brew install libyaml'
hovsater commented 3 years ago

Closing in favor of #40.