Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branch master not satisfy condition >= #563

Open
kostya opened this issue Oct 25, 2022 · 5 comments
Open

branch master not satisfy condition >= #563

kostya opened this issue Oct 25, 2022 · 5 comments

Comments

@kostya
Copy link

kostya commented Oct 25, 2022

My project have dependencies (master because i want to test some things, before release version):
shard1
shard2 branch: master

shard1 have dependencies:
shard2 version >= '1.0.0'

both dependencies is ok, because master is >= 1.0.0, but shards unable to resolve this Failed to resolve dependencies.

@straight-shoota
Copy link
Member

Can you provide a reproducible example?
This should be expected to work, as you mention. And I'm sure shards does that correctly (in general).

@kostya
Copy link
Author

kostya commented Oct 25, 2022

dependencies:
  test_shard1:
    github: kostya/test_shard1
  test_shard2:
    github: kostya/test_shard2
    branch: master

shards --version
Shards 0.17.0 [85b30b5] (2022-03-24)

shards update
Resolving dependencies
Fetching https://github.com/kostya/test_shard1.git
Fetching https://github.com/kostya/test_shard2.git
Unable to satisfy the following requirements:

- `test_shard2 (branch master)` required by `shard.yml`
- `test_shard2 (>= 1.0.0)` required by `test_shard1 0.1.0`
Failed to resolve dependencies


@beta-ziliani
Copy link
Member

I think it's sensible that shards takes >= 1.0.0 to mean "releases >= than...". For such scenario, you should go with shards.override.yml (at least until we find another way).

@kostya
Copy link
Author

kostya commented Nov 25, 2022

There is a way to check if branch >= sha or not:
git rev-list --count v1.0.0..master
if it return number > 0, master is >= v1.0.0

@straight-shoota
Copy link
Member

@kostya That check only works correctly if the commit tagged with v1.0.0 is a parent of master, which is not necessarily the case.

This is not really necessary, though. The combination of branch: master and version: >= 1.0.0 can be verified by fetching shard.yml at master and checking the reported version against the constraint.

I think that should work and that's what I would expect to happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants