How to display the shards dependencies tree?

e.g. when I run shards build on my project, use latest Crystal 1.20.0 dev, it give me a error like this:

In lib/splay_tree_map/src/splay_tree_map.cr:68:33

 68 | @lock = Mutex.new(protection: Mutex::Protection::Reentrant)
                                    ^---------------------------
Error: undefined constant Mutex::Protection::Reentrant

But I never add it in my shard.yml, how can I quick find it out which shards dependent it?

okay, I found it use rg within the lib folder, but I really hope shards can print the dependencies tree, is it possible?

splay_tree_map/shard.yml:1:name: splay_tree_map
lucky_cache/shard.yml:12:  splay_tree_map:
lucky_cache/shard.yml:13:    github: wyhaines/splay_tree_map.cr

ping @wyhaines , this shards not work on Crystal 1.20.0

shards list --tree

2 Likes