Skip to content
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

Infinite loop on transient dependency cycle. #40

Closed
ferd opened this issue Dec 5, 2014 · 1 comment
Closed

Infinite loop on transient dependency cycle. #40

ferd opened this issue Dec 5, 2014 · 1 comment
Labels

Comments

@ferd
Copy link
Collaborator

ferd commented Dec 5, 2014

To replicate:

λ a → echo "{deps, [{c, ".*", {git, "https://ferd@bitbucket.org/ferd/c.git", "master"}}]}." > rebar.config
λ a → DEBUG=1 ~/code/self/rebar3/rebar3 compile
...
===> Consult config file "_build/default/lib/b/rebar.config"
===> Consult config file "_build/default/lib/c/rebar.config"
===> Consult config file "rebar.lock"
===> Consult config file "_build/default/lib/c/rebar.config"
===> Consult config file "_build/default/lib/b/rebar.config"
===> Consult config file "rebar.lock"
===> Consult config file "_build/default/lib/c/rebar.config"
===> Consult config file "rebar.lock"
===> Consult config file "_build/default/lib/c/rebar.config"
===> Consult config file "_build/default/lib/b/rebar.config"
===> Consult config file "rebar.lock"
===> Consult config file "_build/default/lib/b/rebar.config"
===> Consult config file "_build/default/lib/c/rebar.config"
===> Consult config file "rebar.lock"
===> Consult config file "_build/default/lib/c/rebar.config"
===> Consult config file "_build/default/lib/c/rebar.config"
===> Consult config file "rebar.lock"
^C

The issue appears to be that the transient dependencies, even if they exist and were fetched properly, will keep looking at each other forever somehow.

The two dependencies are for this reproduction are:

@ferd ferd added the bug label Dec 5, 2014
ferd added a commit that referenced this issue Dec 6, 2014
- Adding tests
- fixing use of set fetching to find repeated deps and prevent infinite
  loops

On a circular loop rebar3 now fails with `{error, no_sort}`, which is
uncaught and should be handled to consider the issue fully fixed.
ferd added a commit that referenced this issue Dec 6, 2014
Partial fix to circular deps (#40)
@ferd
Copy link
Collaborator Author

ferd commented Dec 6, 2014

Fixed in #44

@ferd ferd closed this as completed Dec 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant