-
-
Notifications
You must be signed in to change notification settings - Fork 107
Open
Description
If a project requires multiple shards, one of which specifies the other, specifying a commit for that one becomes impossible, short of using a shard.override
Steps to reproduce:
- Create a new shard and push (https://codeberg.org/Sylphrena/one)
- Create another shard and push (https://codeberg.org/Sylphrena/two)
- To better illustrate a real-world example, set version of this shard to 0.2.0 (optional)
- Make shard
onerequire shardtwowith version>= 0.1.0for example - Tag both shards,
onewithv0.1.0andtwowithv0.2.0 - Create a new shards file using
shards initsomewhere and add the two shards as dependencies.
name: shards-test
version: 0.1.0
dependencies:
one:
codeberg: sylphrena/one
version: 0.1.0
two:
codeberg: sylphrena/two
version: 0.2.0- Run
shards installand notice that it works. - Delete the lock file
- Change the new
shard.ymlto specify a commit, it can even be the one that's tagged, doesn't matter.
name: shards-test
version: 0.1.0
dependencies:
one:
codeberg: sylphrena/one
version: 0.1.0
two:
codeberg: sylphrena/two
commit: 95d6a271ed01c4a4228a2fe6ef641451f469cb8c- Run
shards installand notice that it does not work
Resolving dependencies
Fetching https://codeberg.org/sylphrena/one.git
Fetching https://codeberg.org/sylphrena/two.git
Unable to satisfy the following requirements:
- `two (commit 95d6a27)` required by `shard.yml`
- `two (>=0.1.0)` required by `one 0.1.0`
Failed to resolve dependenciesEven though commit 95d6a27 is a tagged version 0.2.0 which worked previously.
Would it be possible to have shards reconcile this difference? I know it can be solved by using a shard.override, but it'd be neat if that weren't necessary. This is also the case when 2 dependencies require the same shard, one with the version and one with the commit.