Skip to content
This repository has been archived by the owner on Feb 3, 2018. It is now read-only.

Panic when backtracking through dep that has a project-level cycle with root #176

Closed
sdboyer opened this issue Mar 4, 2017 · 0 comments
Closed
Labels

Comments

@sdboyer
Copy link
Owner

sdboyer commented Mar 4, 2017

golang/dep#171 demonstrated an issue where we'd try to pop the root project out of the selection set b/c it looks like there's no dependencies on it. That causes a panic, b/c selection.popDep() (intentionally) doesn't verify a dep is present before popping - if it occurs, it would indicate other bugs in the algorithm, so it's better to straight panic than mask an implementation problem.

The fix is just to not attempt to pop a dep in solver.unselectLast() if they're from the root.

@sdboyer sdboyer added the bug label Mar 4, 2017
@sdboyer sdboyer closed this as completed in eba751a Mar 4, 2017
krisnova pushed a commit to krisnova/dep that referenced this issue Apr 21, 2017
Project-level cycles are fine, but we can't apply the same logic to
the root project as non-root projects when cleaning up the selection
while backtracking. Fixes sdboyer/gps#176.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant