{"action":"created","issue":{"url":"https://api.github.com/repos/elixir-lang/elixir/issues/4420","repository_url":"https://api.github.com/repos/elixir-lang/elixir","labels_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4420/labels{/name}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4420/comments","events_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4420/events","html_url":"https://github.com/elixir-lang/elixir/issues/4420","id":142484000,"number":4420,"title":"Circular dependency avoidance","user":{"login":"bcardarella","id":18524,"avatar_url":"https://avatars.githubusercontent.com/u/18524?v=3","gravatar_id":"","url":"https://api.github.com/users/bcardarella","html_url":"https://github.com/bcardarella","followers_url":"https://api.github.com/users/bcardarella/followers","following_url":"https://api.github.com/users/bcardarella/following{/other_user}","gists_url":"https://api.github.com/users/bcardarella/gists{/gist_id}","starred_url":"https://api.github.com/users/bcardarella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcardarella/subscriptions","organizations_url":"https://api.github.com/users/bcardarella/orgs","repos_url":"https://api.github.com/users/bcardarella/repos","events_url":"https://api.github.com/users/bcardarella/events{/privacy}","received_events_url":"https://api.github.com/users/bcardarella/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-21T22:02:20Z","updated_at":"2016-03-21T23:49:14Z","closed_at":null,"body":"I'm not sure if this would be considered a bug or not. Here is my situation.\r\n\r\nI have a library I wrote. It is adapter based. One of the adapters was getting to be large so I broke it out into its own library. Let's call the original library the Parent and the extracted library the Child.\r\n\r\nIn the child library I depend upon the parent library in `mix.exs`. However, I want to include the child library along with the parent library, I just want to keep the repos separate. (the child library was accounting for 99% of the test suite time and will see much less churn/releases than the parent)\r\n\r\nSo I set the child as a dependency of the parent.\r\n\r\nChild `mix.exs`:\r\n\r\n```elixir\r\n{:parent, \"~> 0.01\"}\r\n```\r\n\r\nParent `mix.exs`:\r\n\r\n```elixir\r\n{:child, \"~> 0.0.1\"}\r\n```\r\n\r\nI figured that Elixir would just resolve the circular dependency. The problem is that when I run`mix deps.get` on the parent it pulls down the published child library, puts it into `deps/child`. Then when I try to run `mix test` on the parent I get the following:\r\n\r\n```\r\nError while loading project :courier at /Users/bcardarella/Dropbox/projects/courier/deps/courier\r\n** (Mix) Trying to load Courier.Mixfile from \"/Users/me/projects/parent/deps/parent/mix.exs\" but another project with the same name was already defined at \"/Users/me/projects/parent/mix.exs\"\r\n```\r\n\r\nBasically the copy of the parent in `deps/` is conflicting with the development copy that I attempting to test against.\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/elixir-lang/elixir/issues/comments/199540671","html_url":"https://github.com/elixir-lang/elixir/issues/4420#issuecomment-199540671","issue_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4420","id":199540671,"user":{"login":"bcardarella","id":18524,"avatar_url":"https://avatars.githubusercontent.com/u/18524?v=3","gravatar_id":"","url":"https://api.github.com/users/bcardarella","html_url":"https://github.com/bcardarella","followers_url":"https://api.github.com/users/bcardarella/followers","following_url":"https://api.github.com/users/bcardarella/following{/other_user}","gists_url":"https://api.github.com/users/bcardarella/gists{/gist_id}","starred_url":"https://api.github.com/users/bcardarella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcardarella/subscriptions","organizations_url":"https://api.github.com/users/bcardarella/orgs","repos_url":"https://api.github.com/users/bcardarella/repos","events_url":"https://api.github.com/users/bcardarella/events{/privacy}","received_events_url":"https://api.github.com/users/bcardarella/received_events","type":"User","site_admin":false},"created_at":"2016-03-21T23:49:14Z","updated_at":"2016-03-21T23:49:14Z","body":"@josevalim in this case it seems odd that the child having the parent as the dep would still install the parent into `deps/` if being called from the parent itself. But I hear you, I figured it was a long shot"}}