Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

precompile_tasks script fails due to ameba #1102

Closed
hanneskaeufler opened this issue Apr 12, 2020 · 4 comments
Closed

precompile_tasks script fails due to ameba #1102

hanneskaeufler opened this issue Apr 12, 2020 · 4 comments
Labels

Comments

@hanneskaeufler
Copy link
Contributor

Has anyone else seen this error when doing shards install? I do get this both locally on macOS as well as when doing a docker-compose up --build. I was only able to "resolve/skip" this by doing SKIP_LUCKY_TASK_PRECOMPILATION=true (https://github.com/hanneskaeufler/blog/blob/master/Dockerfile.dev#L30), but that's not a real solution obviously. My shard.lock is https://github.com/hanneskaeufler/blog/blob/master/shard.lock.

12:58:03-~/Projects/personal/blog (master)$ shards install
Resolving dependencies
Fetching https://github.com/luckyframework/lucky.git
Fetching https://github.com/luckyframework/lucky_cli.git
Fetching https://github.com/luckyframework/teeplate.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/kostya/blank.git
Fetching https://github.com/crystal-lang/crystal-db.git
Fetching https://github.com/will/crystal-pg.git
Fetching https://github.com/luckyframework/dexter.git
Fetching https://github.com/luckyframework/shell-table.cr.git
Fetching https://github.com/luckyframework/lucky_router.git
Fetching https://github.com/paulcsmith/cry.git
Fetching https://github.com/crystal-loot/exception_page.git
Fetching https://github.com/jwoertink/sitemapper.git
Fetching https://github.com/taylorfinnell/awscr-s3.git
Fetching https://github.com/taylorfinnell/awscr-signer.git
Fetching https://github.com/icyleaf/markd.git
Fetching https://github.com/veelenga/ameba.git
Fetching https://github.com/hanneskaeufler/crytic.git
Installing lucky (0.20.0)
Installing sitemapper (0.6.0)
Installing markd (0.2.0)
Installing ameba (0.12.0)
Installing crytic (7.0.0)
Installing lucky_cli (0.20.0)
Installing habitat (0.4.3)
Installing wordsmith (0.2.0)
Installing avram (0.13.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.1.3)
Installing awscr-s3 (0.7.0 at 48bb79a87d9bf25a2c48a8d0ad8c973c3d30892b)
Installing teeplate (0.8.1)
Installing blank (0.1.0)
Installing db (0.8.0)
Installing pg (0.20.0)
Installing awscr-signer (0.7.0)
Postinstall of lucky: script/precompile_tasks
Failed postinstall of lucky on script/precompile_tasks:
Resolving dependencies
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/veelenga/ameba.git
Fetching https://github.com/luckyframework/teeplate.git
Fetching https://github.com/kostya/blank.git
Fetching https://github.com/crystal-lang/crystal-db.git
Fetching https://github.com/will/crystal-pg.git
Using lucky_cli (0.20.0)
Using habitat (0.4.3)
Using wordsmith (0.2.0)
Using avram (0.13.0)
Using lucky_router (0.2.2)
Using shell-table (0.9.2 at 078a04ea58ead5203bb435a3b5fff448ddabaeea)
Using cry (0.4.2)
Using exception_page (0.1.4)
Using dexter (0.1.3)
Using ameba (0.12.0)
Using teeplate (0.8.1)
Using blank (0.1.0)
Using db (0.8.0)
Using pg (0.20.0)
Unhandled exception: Error opening file with mode 'r': '/Users/hanneskaeufler/Projects/personal/blog/lib/lucky/lib/ameba/bin/ameba': No such file or directory (File::NotFoundError)
  from File::new<String, String, File::Permissions, Nil, Nil>:File
  from Shards::Package#install_executables:Nil
  from Shards::Commands::Install@Shards::Command::run<String>:Nil
  from ~procProc(Array(String), Array(String), Nil)@src/cli.cr:39
  from __crystal_main
  from main
@wout
Copy link
Contributor

wout commented Apr 12, 2020

Have you tried shards prune before shards install? Or maybe remove the lib dir and then run shards again?

@hanneskaeufler
Copy link
Contributor Author

I swear I did rm -r lib/ and rm -r bin/ multiple times before. Doing it once more just now made it work for some reason. Will open again if I see it again ...

@hanneskaeufler
Copy link
Contributor Author

Just remembered that I can reproduce this on docker-compose: https://github.com/hanneskaeufler/blog/pull/189/checks?check_run_id=581012433#step:3:388
So either I am doing something weird, or there is a bug lurking in there somewhere.

@jwoertink
Copy link
Member

This is fixed by #1589

TL;DR the precompile script was calling shards build which installed ameba (even if you didn't use it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants