-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Support shard renames #327
Conversation
This basically implements my proposal from #310 (comment) so I agree with that change as it seems like the most expected behaviour and avoids serious ux issues. We should still consider the critical voices from #310 and especially make sure that edge cases are handled properly. Please also see my suggested implementation in straight-shoota:feature/renamed-shard. |
I wasn’t aware of that conversation. Thank you for pointing it out. I think it makes sense but I’m not sure the implementation is that simple like yours. Anyway, tomorrow I’ll analyze it and update this PR. |
We need to document the following known issue: A recently renamed shard must have an explicit branch or ref requirement. Otherwise since the lookup of all available versions and filtering for matching new name leads to an empty list, there is no installation possible. |
1b652ae
to
eedcc08
Compare
@straight-shoota I just updated the PR and the description |
I don't follow. Why can't the available versions be limited to those matching the dependency name? This should at least work for the name at HEAD. @waj Could you please add specs for using both old_name and new_name as a dependency without a version restriction? And the same for another dependency where the only version with new_name is not tagged. |
@straight-shoota after the push after my comment the implementation and the |
Oops, I missed that. |
@straight-shoota I just added the specs you requested. For the untagged head, it works when the "branch" is specified, because there is already tags in the repository. Actually I think this should be always the case, and the switch to "git ref" mode shouldn't be automatic when there is no tags, but that's a topic for another PR 🙂 |
Looks good to me. But I'd like to get feedback from @ysbaddaden and @RX14 as well because of the concerns voiced in #310. |
My concern was that it wasn't worth implementing cause of the complexity. This is a small diff, I think it's up to @ysbaddaden now. |
17d3dea
to
3e9ce40
Compare
Support shard renames
Currently a shard that was renamed in some point in history cannot be installed unless a version is specified. This is annoying, because for example this
shard.yml
fails with a misleading error:This PR allows installing latest version of a shard (when no version is specified) or a previous version only if the name matches.