crystal-lang / shards

Dependency manager for the Crystal language
Other
765 stars 102 forks source link

Postinstall of dependent shard not called #383

Closed kostya closed 4 years ago

kostya commented 4 years ago

Shards 0.10.0 [4091ac5] (2020-04-06) Crystal 0.34.0 [4401e90f0] (2020-04-06)

dependencies:
  lucky_svg_sprite:
    github: tilishop/lucky_svg_sprite.cr

here postinstall for myhtml not called, and called Postinstall of lucky_svg_sprite, which compile something that requires mytml postinstall, then if failed.

shards install
Resolving dependencies
Fetching https://github.com/tilishop/lucky_svg_sprite.cr.git
Fetching https://github.com/kostya/myhtml.git
Fetching https://github.com/cadmiumcr/transliterator.git
Installing lucky_svg_sprite (0.4.1)
Installing myhtml (1.5.1)
Installing cadmium_transliterator (0.1.0 at 6ee68d64869ade8f39d2ec16cae3c7b80d5a4805)
Postinstall of lucky_svg_sprite: make generator
Failed postinstall of lucky_svg_sprite on make generator:
/home/kostya/Downloads/crystal-0.34.0-1/bin/shards build
Resolving dependencies
Fetching https://github.com/kostya/myhtml.git
Fetching https://github.com/cadmiumcr/transliterator.git
Fetching https://github.com/tilishop/spec_mirror.cr.git
Fetching https://github.com/crystal-ameba/ameba.git
Fetching https://github.com/luckyframework/lucky.git
Fetching https://github.com/luckyframework/lucky_cli.git
Fetching https://github.com/luckyframework/habitat.git
Fetching https://github.com/luckyframework/wordsmith.git
Fetching https://github.com/luckyframework/avram.git
Fetching https://github.com/luckyframework/lucky_router.git
Fetching https://github.com/luckyframework/shell-table.cr.git
Fetching https://github.com/paulcsmith/cry.git
Fetching https://github.com/crystal-loot/exception_page.git
Fetching https://github.com/luckyframework/dexter.git
Fetching https://github.com/luckyframework/teeplate.git
Fetching https://github.com/kostya/blank.git
Fetching https://github.com/will/crystal-pg.git
Fetching https://github.com/crystal-lang/crystal-db.git
Using myhtml (1.5.1)
Using cadmium_transliterator (0.1.0 at 6ee68d64869ade8f39d2ec16cae3c7b80d5a4805)
Installing spec_mirror (0.1.2)
Installing ameba (0.12.1)
Installing lucky (0.21.0)
Installing lucky_cli (0.21.0)
Installing habitat (0.4.3)
Installing wordsmith (0.2.0)
Installing avram (0.14.0)
Installing lucky_router (0.2.2)
Installing shell-table (0.9.2 at 078a04ea58ead5203bb435a3b5fff448ddabaeea)
Installing cry (0.4.2)
Installing exception_page (0.1.4)
Installing dexter (0.2.0)
Installing teeplate (0.8.1)
Installing blank (0.1.0)
Installing pg (0.21.0)
Installing db (0.9.0)
Postinstall of spec_mirror: make run_file
Postinstall of ameba: make bin && make run_file
Postinstall of lucky: script/precompile_tasks
Postinstall of avram: script/precompile_tasks
Writing shard.lock
/home/kostya/Downloads/crystal-0.34.0-1/bin/crystal build ./tasks/generate_svg_sprite.cr -o ../../bin/lucky.gen.svg_sprite --release
cc: ошибка: /home/kostya/projects/bla/lib/lucky_svg_sprite/lib/myhtml/src/myhtml/../ext/modest-c/lib/libmodest_static.a: Нет такого файла или каталога
Error: execution of command failed with code: 1: `cc "${@}" -o '/home/kostya/projects/bla/bin/lucky.gen.svg_sprite'  -rdynamic  /home/kostya/projects/bla/lib/lucky_svg_sprite/lib/myhtml/src/myhtml/../ext/modest-c/lib/libmodest_static.a -lpcre -lm /home/kostya/Downloads/crystal-0.34.0-1/bin/../lib/crystal/lib/libgc.a -lpthread /home/kostya/Downloads/crystal-0.34.0-1/share/crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/home/kostya/Downloads/crystal-0.34.0-1/bin/../lib/crystal/lib -L/home/kostya/Downloads/crystal-0.34.0-1/bin/../lib/crystal/lib`
make: *** [Makefile:8: generator] Ошибка 1

if i manually run postinstall for myhtml in lib/myhtml, then shards install works.

asterite commented 4 years ago

Is it similar or related to https://github.com/crystal-lang/shards/issues/360 ? It might be already fixed in master.

wout commented 4 years ago

I managed to work around this issue by adding the myhtml shard right before lucky_svg_sprite:

myhtml:
  github: kostya/myhtml
  version: ~> 1.5
lucky_svg_sprite:
  github: tilishop/lucky_svg_sprite.cr
  version: ~> 0.4.1
waj commented 4 years ago

Yes, this is a duplicate of #360 and it's already fixed for the next release! (0.11)