Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

pkgtree: fix handling of cyclic import graphs #2003

Merged
merged 2 commits into from
Sep 6, 2018
Merged

Conversation

benesch
Copy link
Contributor

@benesch benesch commented Sep 6, 2018

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 #2001.

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.
In wmToReach, self-imports are now handled properly by the general
cycle-handling code (i.e., when a package is colored grey). There is no
longer any need to special case self-imports, which are just zero-length
cycles.
@sdboyer sdboyer merged commit bbe56e5 into golang:master Sep 6, 2018
@sdboyer
Copy link
Member

sdboyer commented Sep 6, 2018

thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants