Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog Entry
To be copied to the draft changelog by merger:
vg autoindexnot error when indexing a graph with oversized snarlsDescription
Okay, so this doesn't actually work yet, but it's a step towards addressing #4724. Last August, vgteam/libbdsg#221 changed bdsg so that
is_regular_snarl()could handle distanceless distance indexes. However, that managed to break stuff for indexes that had distances but also had oversized snarls. In particular, causing this error:Great, I thought, why not just pass a graph? If this was trickling down from
vg autoindex, we already had such a graph in a calling function. I had that graph handed down the line. And now we no longer get the same error. Instead, we get a different error! The very next one:So, uh, yeah. This is still broken. I wanted to document the test case and my attempt at fixing it, though. Possible ways to fix the next error include:
allow_internal_loop = true; before we were had the default offalse, so when I had to be explicit about it I just used that, but we could change itOVERSIZED_SNARLfrom the types that trigger the new error; they do store distances to the boundary nodes so that should let us calculate whether there's a self-loop, right?@xchang1 thoughts?