-
Notifications
You must be signed in to change notification settings - Fork 198
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
Crate marked as yanked when both yanked and unyanked in one index-update #2295
Comments
@Byron you have more info here? |
Also, related discussion on zulip: https://rust-lang.zulipchat.com/#narrow/stream/356853-t-docs-rs/topic/.E2.9C.94.20unyank.20docs.2Fdoc.28cfg.29.20ignored |
I will take a look ASAP, but vaguely remember that there is a test for this already so I doubt something regressed. But who knows, maybe it's something new that never worked and we just weren't aware. As long as I can still find the respective operations/commits in the crates-index repo I should be able to make it reproducible. |
Thanks for checking! For me it would be good enough to know in which order the updates will be emitted by |
After taking a closer look I am quite sure that this can't be adapted to, not in its current form. The documentation states that multiple changes for a single crate are emitted in any order. Tests also deal with the problem by sorting beforehand to get a deterministic order, but now this needs to change to be deterministic. Let's see if I can do that without hurting performance too much (and even if so, performance is clearly secondary here). |
That's strange: The However, this line seems to also have solved a problem, but it might have been coincidence. The problem remains: should there be deterministic ordering between line-based changes? The answer here is most certainly: Yes, so I will see to it, which should allow the line 294 to be removed without side-effects. |
Alright, it took me a while to realise my naiveté in trying to impose any ordering of changes within a diff and assume it's more than 'ordered by line number', but at least it's deterministic then. I also don't know what line 294 is trying to solve, maybe figuring that out helps to solve the true underlying problem. My adjustment right now makes the order of multiple changes to a crate deterministic, as it will order them by line number, ascending. And some determinism is certainly an improvement as to not trick anybody into imposing their own ordering for that reason alone. |
…fication. This can happen if a crate is yanked and unyanked in one commit, which happens in practice even though I am not sure how it's possible. Related issue: rust-lang/docs.rs#2295
I have released a new version which uses the latest There is definitely no need to reverse the order as done in line 294 as I hope that helps and that soon there will be no issues whatsoever related to the tracking of changes to crates 😅. |
It appears we process the yank and unyank events in the wrong order when they come together in one update:
We're explicitly reversing the changes:
docs.rs/src/build_queue.rs
Lines 293 to 294 in 4514194
Maybe this order was changed in a crates-index-diff update?
The text was updated successfully, but these errors were encountered: