-
Notifications
You must be signed in to change notification settings - Fork 1k
dep sometimes omits a dependency #2001
Comments
Interesting! First reported bug in that function since before we released dep publicly :) i've replicated it locally. This kind of nondeterministic behavior does strongly suggest you've tracked it to the right place, as that function relies on maps (and, evidently, map iteration order) for its depth-first search process. i'll get it figured out and patched up. |
Determining reachability in the face of cyclic imports requires "merging" the reachsets of the packages in the cycle. Previously, dep could nondeterministically lose dependencies in cyclic graphs depending on the order in which it traversed the graph. Fix golang#2001.
Heh, no kidding! I guess that checks out: once I dove in it was actually quite easy to follow. It looked far scarier on the surface. Hopefully you haven't sunk too much time into this. I couldn't help but poke at this some more tonight, and I think I finally cracked it: #2003. Thanks for being insanely quick to respond! It's much appreciated. |
Awesome! Thanks for digging into that. And you're lucky, tbqh, i didn't look at the queue much in August 😢 And yeah, the last time we had a bug here, it was the very xtest bug on cycles that you ran into again. Exact same class of problem, owing to the lack of distinguishing information that we have in the search function. |
Determining reachability in the face of cyclic imports requires "merging" the reachsets of the packages in the cycle. Previously, dep could nondeterministically lose dependencies in cyclic graphs depending on the order in which it traversed the graph. Fix golang#2001.
We've been having trouble with Dep over at CockroachDB lately; it's been spuriously dropping a dependency on the floor! I finally managed to get a minimal reproduction.
Run
dep init
once, then the following:That command will non-deterministically fail! Sometimes dep will install the required Windows dependency github.com/shirou/w32; sometimes it won't. I've dug into this to the best of my ability, but the error seems to occur in
pkgtree.wmToReach
, and I'm afraid that function is well beyond my understanding at the moment./cc @dt
The text was updated successfully, but these errors were encountered: