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

Make errors with git refs more descriptive #389

Merged
merged 3 commits into from
May 19, 2020

Conversation

waj
Copy link
Member

@waj waj commented May 12, 2020

Currently when a git ref doesn't exist, the resolver just returns an empty array for the available versions. This makes the solver to fail with a confusing message. For example:

Unable to satisfy the following requirements:

- `db (branch foo)` required by `shard.yml`

With this PR, the error is handled more prematurely, thus providing better info:

Could not find branch foo in the repository https://github.com/crystal-lang/crystal-db.git for shard "db"

Also, if a commit hash is used, the full hash is displayed:

Could not find commit fd686ad3015f48f8b22cf4fbec80e8c8088ef44b in the repository https://github.com/crystal-lang/crystal-db.git for shard "db"

Related to #384, #386

@waj waj added this to the v0.11.0 milestone May 18, 2020
@waj waj merged commit bd451ed into crystal-lang:master May 19, 2020
@waj waj deleted the git-ref-errors branch May 19, 2020 13:42
taylor pushed a commit to vulk/shards that referenced this pull request Aug 11, 2020
f-fr pushed a commit to f-fr/shards that referenced this pull request Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants