I’m growing convinced of dropping both the postinstall
and executables
features in Shards with no replacement.
TLDR: the conveniences are actually inconveniences; they hinder benefits of using Crystal; they fall beyond Shard’s mission: resolve and install dependencies. Let’s drop them.
The postinstall
script was meant to quickly build a vendored C library or generate C bindings automatically after install. It was meant to be a convenience for users that install the library, so they can avoid manually typing commands (then forget to automate) and shard authors wouldn’t have to document these additional steps.
In practice arbitrary code is executed on your machine and when it fails for some reason, then shards fails to install dependencies (todo: insert “you had one job meme”). I’m not even talking about Windows, merely assuming Bash or GNU make will break 
For the executables
I’m still searching for an actual use case. I frankly can’t remember.
Since in many cases the executable to install is built by the post install script, using --skip-postinstall
will break, so you must also specify --skip-executables

As much as I am a proponent of the postinstall
script, I can only agree that the conveniences are starting to become painful 
For example Ameba always building itself and installing its executable is a great demonstration of the problem: Ameba is actually an application. Being installable as a library is a special case for when you need Ameba with additional or custom rules for an application (and that’s very nice). In which case it should be documented how to
Micrate also always builds itself and… that requires the mysql
, pg
, and sqlite3
shards as hard dependencies which in turn requires to install the libsqlite3-dev
system package (see this unresolved issue 
I believe these usages come from Ruby (among others), where applications and tools are distributed as gems. It’s thus natural to install them as development dependencies.
But this is Crystal, and one of the main selling point is that we can compile to a single file that is easy to distribute… and we’re not even benefiting from that in our own ecosystem, worse, we provide the very tools to hinder it 
IMO we shall drop support for the postinstall
script, and executables
should become merely informational. The few affected shards should either distribute executables (or let users and packagers build them) and properly document when an external library is expected (which one, where to find it, commands to run to build a vendored copy, etc), just like the sqlite3
shard expects the system to have libsqlite3.so
and/or libsqlite3.a
installed.