{"action":"created","issue":{"url":"https://api.github.com/repos/elixir-lang/elixir/issues/4783","repository_url":"https://api.github.com/repos/elixir-lang/elixir","labels_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4783/labels{/name}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4783/comments","events_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4783/events","html_url":"https://github.com/elixir-lang/elixir/issues/4783","id":158761684,"number":4783,"title":"Regression in f957d2fb76a6206493feb451f1035b1ee9338dc1 breaks the `test_all` mix task in my umbrella project","user":{"login":"myronmarston","id":49391,"avatar_url":"https://avatars.githubusercontent.com/u/49391?v=3","gravatar_id":"","url":"https://api.github.com/users/myronmarston","html_url":"https://github.com/myronmarston","followers_url":"https://api.github.com/users/myronmarston/followers","following_url":"https://api.github.com/users/myronmarston/following{/other_user}","gists_url":"https://api.github.com/users/myronmarston/gists{/gist_id}","starred_url":"https://api.github.com/users/myronmarston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myronmarston/subscriptions","organizations_url":"https://api.github.com/users/myronmarston/orgs","repos_url":"https://api.github.com/users/myronmarston/repos","events_url":"https://api.github.com/users/myronmarston/events{/privacy}","received_events_url":"https://api.github.com/users/myronmarston/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-06-06T20:00:51Z","updated_at":"2016-06-06T20:46:30Z","closed_at":"2016-06-06T20:44:40Z","body":"### Environment\r\n\r\n* Elixir version (elixir -v):\r\n\r\n```\r\nErlang/OTP 18 [erts-7.2.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]\r\n\r\nElixir 1.3.0-rc.0 (3b5bb5c)\r\n```\r\n\r\n(This is HEAD as of this morning).\r\n\r\n* Operating system:\r\n\r\nOS X El Capitan\r\n\r\n### Current behavior\r\n\r\nWhen I run `mix test_all` in my umbrella app, I get this error:\r\n\r\n```\r\n** (RuntimeError) trying to access Mix.Project.app_path for an umbrella project but umbrellas have no app\r\n    (mix) lib/mix/project.ex:332: Mix.Project.app_path/1\r\n    (mix) lib/mix/project.ex:353: Mix.Project.compile_path/1\r\n    (mix) lib/mix/tasks/test.ex:187: Mix.Tasks.Test.run/1\r\n    (mix) lib/mix/task.ex:296: Mix.Task.run_task/3\r\n    (mix) lib/mix/cli.ex:58: Mix.CLI.run_task/2\r\n```\r\n\r\nThis task is a custom one in our project ([which I proposed on the mailing list](https://groups.google.com/forum/#!searchin/elixir-lang-core/test_all/elixir-lang-core/8wX8i5sEtFg/zxJaYGFeDwAJ) at one point) which looks like this:\r\n\r\n``` elixir\r\ndefmodule MyProject.Mixfile do\r\n  use Mix.Project\r\n\r\n  def project do\r\n    [\r\n      # ...\r\n      test_paths: test_paths,\r\n      preferred_cli_env: %{ test_all: :test },\r\n      # ...\r\n    ]\r\n  end\r\n\r\n  defp test_paths do\r\n    \"apps/*/test\" |> Path.wildcard |> Enum.sort\r\n  end\r\nend\r\n\r\n# `mix test` cd's into each app directory in sequence and runs the tests.\r\n# `mix test_all` runs tests for all apps at the same time.\r\ndefmodule Mix.Tasks.TestAll do\r\n  use Mix.Task\r\n  @shortdoc \"Runs all sub-app tests at once\"\r\n  defdelegate run(args), to: Mix.Tasks.Test\r\nend\r\n```\r\n\r\nUsing `git bisect` on the elixir repo, I tracked the problem down to f957d2fb76a6206493feb451f1035b1ee9338dc1.  On the parent commit (03039938e84771e72cdf3c42ee04ddf76a30a26e) it does not occur.\r\n\r\n### Expected behavior\r\n\r\nIt should not fail in this manner.  Our `test_all` task worked on Elixir 1.2.x and on Elixir 1.3.0-rc.0."},"comment":{"url":"https://api.github.com/repos/elixir-lang/elixir/issues/comments/224082883","html_url":"https://github.com/elixir-lang/elixir/issues/4783#issuecomment-224082883","issue_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4783","id":224082883,"user":{"login":"antipax","id":56482,"avatar_url":"https://avatars.githubusercontent.com/u/56482?v=3","gravatar_id":"","url":"https://api.github.com/users/antipax","html_url":"https://github.com/antipax","followers_url":"https://api.github.com/users/antipax/followers","following_url":"https://api.github.com/users/antipax/following{/other_user}","gists_url":"https://api.github.com/users/antipax/gists{/gist_id}","starred_url":"https://api.github.com/users/antipax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antipax/subscriptions","organizations_url":"https://api.github.com/users/antipax/orgs","repos_url":"https://api.github.com/users/antipax/repos","events_url":"https://api.github.com/users/antipax/events{/privacy}","received_events_url":"https://api.github.com/users/antipax/received_events","type":"User","site_admin":false},"created_at":"2016-06-06T20:46:30Z","updated_at":"2016-06-06T20:46:30Z","body":"@myronmarston Actually, now that I think about it `mix test --stale` wouldn't improve your use case, my bad. :) \r\n\r\nForgot that we changed it so it would only start determining which tests are stale until until you have a totally successful test suite."}}
{"actor":{"display_login":"antipax"}}