You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any plan to add a command similar to go mod vendor, or something similar that can make tarballs of a Shard's dependencies automatically?
The reason I'm asking is because Slackware Linux's community packages, called SlackBuilds, strongly discourages the downloading of any sort of dependencies at build time. Instead, all sources needed for building should be downloadable ahead of time. I use Slackware myself and would really like to distribute some of my Crystal software as SlackBuilds.
However, Shards seems to clash with the way SlackBuilds are handled. For example, if I check out a shard and run shards build, Shards will download dependencies via git/mercurial/fossil/etc into a lib directory. It looks like it also symlinks this directory into a lib directory for each dependency.
People who maintain Go-based programs often use the go mod vendor command to wrap up everything needed into a separate vendor directory (for example, nwg-bar). Rust packages do something similar, where the crates are downloaded ahead of time (e.g. alacritty).
I've already tried manually putting the dependencies in a lib directory that I created myself, but Shards insists on re-downloading them. Adding --local doesn't help. So far the only solution I've found is to call the compiler directly, but this seems to run counter to having Shards build stuff in the first place.
The text was updated successfully, but these errors were encountered:
So far the only solution I've found is to call the compiler directly, but this seems to run counter to having Shards build stuff in the first place.
I think this is a perfectly fine solution. Shards' purpose is to manage dependencies. If you don't need that because all dependencies are already packaged, there's simply no point in using Shards.
I was under the impression that Shards managed dependencies and acted as a build tool. But, if the recommended way is to just reconstruct the lib/ directory by hand (as I'm doing now), then that's fine.
I do still think it would benefit from some sort of vendor command, though, where it tarballs your dependencies for you. It took me far longer to tarball the correct dependencies for Benben as specified by shards.lock the other day than I care to admit 😅
Is there any plan to add a command similar to
go mod vendor
, or something similar that can make tarballs of a Shard's dependencies automatically?The reason I'm asking is because Slackware Linux's community packages, called SlackBuilds, strongly discourages the downloading of any sort of dependencies at build time. Instead, all sources needed for building should be downloadable ahead of time. I use Slackware myself and would really like to distribute some of my Crystal software as SlackBuilds.
However, Shards seems to clash with the way SlackBuilds are handled. For example, if I check out a shard and run
shards build
, Shards will download dependencies via git/mercurial/fossil/etc into alib
directory. It looks like it also symlinks this directory into alib
directory for each dependency.People who maintain Go-based programs often use the
go mod vendor
command to wrap up everything needed into a separatevendor
directory (for example, nwg-bar). Rust packages do something similar, where the crates are downloaded ahead of time (e.g. alacritty).I've already tried manually putting the dependencies in a
lib
directory that I created myself, but Shards insists on re-downloading them. Adding--local
doesn't help. So far the only solution I've found is to call the compiler directly, but this seems to run counter to having Shards build stuff in the first place.The text was updated successfully, but these errors were encountered: