Does a shards dependency always download the latest version of a repository by default?

In a shard.yaml file, I put:


    github: naqvis/webview

    github : serge-hulne/bakerstreet

and I don’t understand why the version of the code of differs from the one I get using the command:

git clone

In other words, what does the version number next to the shard refer to in the text hereunder?

shards install

Resolving dependencies



Installing webview (0.2.1)

Postinstall of webview: make

Installing bakerstreet (0.1.0 at 718a09a)

If no specific version is selected, shards installs the latest release (i.e. the highest tag). When there are no releases (i.e. no tags), it uses HEAD of the main branch.
That should resolve to the same version as git clone.

You may see different results when a previously resolved version is locked. shards install respects the versions locked in shard.lock. In that case you need to explicitly update the dependency via shards update.

1 Like

I see. Thank you very much!