I am actually describing two issues here. First, on one of my server instances, shards install checked out dependency code into lib/ that did not match the version specified in shard.lock and lib/.shards.info. The code in lib/ was from a different tag (or main/HEAD), but the lockfiles were correct.
This will probably be hard to reproduce and fix, so let's focus on my second issue:
Subsequent shards install runs did not replace the incorrect code in lib/, even though shard.lock and lib/.shards.info specified a different version. There was no warning or error about the version mismatch.
Expected Behavior
I would have expected one of the following:
shards install always replacing the code in lib/ to match shard.lock.
- Error out or at least print a warning when the version in
lib/<shard>/shard.yml does not match shard.lock.
Actual Behavior
Incorrect code persisted in lib/ across multiple shards install runs. No feedback was provided about the mismatch.
Environment
Shards version: 0.20.0 (2025-12-19)
OS: Ubuntu Noble (arm64) on EC2
Notes
- The cached repository in
~/.cache/shards/ was correct.
- Only deleting
lib/ and manually and reinstalling resolved the issue.
I am actually describing two issues here. First, on one of my server instances,
shards installchecked out dependency code intolib/that did not match the version specified inshard.lockandlib/.shards.info. The code inlib/was from a different tag (ormain/HEAD), but the lockfiles were correct.This will probably be hard to reproduce and fix, so let's focus on my second issue:
Subsequent
shards installruns did not replace the incorrect code inlib/, even thoughshard.lockandlib/.shards.infospecified a different version. There was no warning or error about the version mismatch.Expected Behavior
I would have expected one of the following:
shards installalways replacing the code inlib/to matchshard.lock.lib/<shard>/shard.ymldoes not matchshard.lock.Actual Behavior
Incorrect code persisted in
lib/across multipleshards installruns. No feedback was provided about the mismatch.Environment
Shards version: 0.20.0 (2025-12-19)
OS: Ubuntu Noble (arm64) on EC2
Notes
~/.cache/shards/was correct.lib/and manually and reinstalling resolved the issue.