{"action":"created","comment":{"url":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments/50243638","id":50243638,"diff_hunk":"@@ -0,0 +1,99 @@\n+Code.require_file \"../../test_helper.exs\", __DIR__\n+\n+defmodule Mix.Tasks.Compile.MakeTest do\n+  use MixTest.Case\n+  import ExUnit.CaptureIO\n+\n+  setup do\n+    Mix.Project.push MixTest.Case.Sample\n+    :ok\n+  end\n+\n+  test \"running without a makefile\" do\n+    msg = ~r/^Could not compile with/\n+\n+    in_fixture \"compile_make\", fn ->\n+      File.rm_rf!(\"Makefile\")\n+\n+      capture_io fn ->\n+        assert_raise Mix.Error, msg, fn -> run() end\n+      end\n+    end\n+  end\n+\n+  test \"running with a makefile\" do\n+    in_fixture \"compile_make\", fn ->\n+      File.write! \"Makefile\", \"\"\"\n+      my_target:\n+      \\t@echo \"hello\"\n+      \"\"\"\n+\n+      assert capture_io(fn -> run() end) =~ \"hello\\n\"\n+    end\n+  end\n+\n+  test \"specifying targets\" do\n+    in_fixture \"compile_make\", fn ->\n+      File.write! \"Makefile\", \"\"\"\n+      useless_target:\n+      \\t@echo \"nope\"\n+      my_target:","path":"lib/mix/test/mix/tasks/compile.make_test.exs","position":40,"original_position":40,"commit_id":"55e6e9b47ff18c1a314e28d507d6d04159b7bbe4","original_commit_id":"55e6e9b47ff18c1a314e28d507d6d04159b7bbe4","user":{"login":"lexmag","id":248290,"avatar_url":"https://avatars.githubusercontent.com/u/248290?v=3","gravatar_id":"","url":"https://api.github.com/users/lexmag","html_url":"https://github.com/lexmag","followers_url":"https://api.github.com/users/lexmag/followers","following_url":"https://api.github.com/users/lexmag/following{/other_user}","gists_url":"https://api.github.com/users/lexmag/gists{/gist_id}","starred_url":"https://api.github.com/users/lexmag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lexmag/subscriptions","organizations_url":"https://api.github.com/users/lexmag/orgs","repos_url":"https://api.github.com/users/lexmag/repos","events_url":"https://api.github.com/users/lexmag/events{/privacy}","received_events_url":"https://api.github.com/users/lexmag/received_events","type":"User","site_admin":false},"body":"Maybe we could drop `my_` prefix? :bowtie:","created_at":"2016-01-20T11:35:18Z","updated_at":"2016-01-20T11:35:18Z","html_url":"https://github.com/elixir-lang/elixir/pull/4134#discussion_r50243638","pull_request_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/4134","_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments/50243638"},"html":{"href":"https://github.com/elixir-lang/elixir/pull/4134#discussion_r50243638"},"pull_request":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/4134"}}},"pull_request":{"url":"https://api.github.com/repos/elixir-lang/elixir/pulls/4134","id":54893622,"html_url":"https://github.com/elixir-lang/elixir/pull/4134","diff_url":"https://github.com/elixir-lang/elixir/pull/4134.diff","patch_url":"https://github.com/elixir-lang/elixir/pull/4134.patch","issue_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4134","number":4134,"state":"open","locked":false,"title":"Add a :make compiler","user":{"login":"whatyouhide","id":3890250,"avatar_url":"https://avatars.githubusercontent.com/u/3890250?v=3","gravatar_id":"","url":"https://api.github.com/users/whatyouhide","html_url":"https://github.com/whatyouhide","followers_url":"https://api.github.com/users/whatyouhide/followers","following_url":"https://api.github.com/users/whatyouhide/following{/other_user}","gists_url":"https://api.github.com/users/whatyouhide/gists{/gist_id}","starred_url":"https://api.github.com/users/whatyouhide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatyouhide/subscriptions","organizations_url":"https://api.github.com/users/whatyouhide/orgs","repos_url":"https://api.github.com/users/whatyouhide/repos","events_url":"https://api.github.com/users/whatyouhide/events{/privacy}","received_events_url":"https://api.github.com/users/whatyouhide/received_events","type":"User","site_admin":false},"body":"I'm opening this PR to test the water regarding the make compiler mentioned by #4082. It doesn't support `nmake` and it's pretty barebones, but it could be a starting point. Here, just a couple of options are configurable: `:make_cwd` to choose the cwd for running `make`, and `:make_targets` for the list of make targets to be run. We could make other options configurable, like specifying a `Makefile`. Also, right now everything that `make` outputs is streamed to stdout, we could make that configurable as well (e.g., `:make_report_only_errors` or something similar).\r\n\r\nWdyt?","created_at":"2016-01-01T17:13:49Z","updated_at":"2016-01-20T11:35:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d438644515d91ca9b0ece6b95a2e09b2e8b313af","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/4134/commits","review_comments_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/4134/comments","review_comment_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4134/comments","statuses_url":"https://api.github.com/repos/elixir-lang/elixir/statuses/55e6e9b47ff18c1a314e28d507d6d04159b7bbe4","head":{"label":"whatyouhide:make-compiler","ref":"make-compiler","sha":"55e6e9b47ff18c1a314e28d507d6d04159b7bbe4","user":{"login":"whatyouhide","id":3890250,"avatar_url":"https://avatars.githubusercontent.com/u/3890250?v=3","gravatar_id":"","url":"https://api.github.com/users/whatyouhide","html_url":"https://github.com/whatyouhide","followers_url":"https://api.github.com/users/whatyouhide/followers","following_url":"https://api.github.com/users/whatyouhide/following{/other_user}","gists_url":"https://api.github.com/users/whatyouhide/gists{/gist_id}","starred_url":"https://api.github.com/users/whatyouhide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatyouhide/subscriptions","organizations_url":"https://api.github.com/users/whatyouhide/orgs","repos_url":"https://api.github.com/users/whatyouhide/repos","events_url":"https://api.github.com/users/whatyouhide/events{/privacy}","received_events_url":"https://api.github.com/users/whatyouhide/received_events","type":"User","site_admin":false},"repo":{"id":27794017,"name":"elixir","full_name":"whatyouhide/elixir","owner":{"login":"whatyouhide","id":3890250,"avatar_url":"https://avatars.githubusercontent.com/u/3890250?v=3","gravatar_id":"","url":"https://api.github.com/users/whatyouhide","html_url":"https://github.com/whatyouhide","followers_url":"https://api.github.com/users/whatyouhide/followers","following_url":"https://api.github.com/users/whatyouhide/following{/other_user}","gists_url":"https://api.github.com/users/whatyouhide/gists{/gist_id}","starred_url":"https://api.github.com/users/whatyouhide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatyouhide/subscriptions","organizations_url":"https://api.github.com/users/whatyouhide/orgs","repos_url":"https://api.github.com/users/whatyouhide/repos","events_url":"https://api.github.com/users/whatyouhide/events{/privacy}","received_events_url":"https://api.github.com/users/whatyouhide/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/whatyouhide/elixir","description":"Elixir is a dynamic, functional language designed for building scalable and maintainable applications","fork":true,"url":"https://api.github.com/repos/whatyouhide/elixir","forks_url":"https://api.github.com/repos/whatyouhide/elixir/forks","keys_url":"https://api.github.com/repos/whatyouhide/elixir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whatyouhide/elixir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whatyouhide/elixir/teams","hooks_url":"https://api.github.com/repos/whatyouhide/elixir/hooks","issue_events_url":"https://api.github.com/repos/whatyouhide/elixir/issues/events{/number}","events_url":"https://api.github.com/repos/whatyouhide/elixir/events","assignees_url":"https://api.github.com/repos/whatyouhide/elixir/assignees{/user}","branches_url":"https://api.github.com/repos/whatyouhide/elixir/branches{/branch}","tags_url":"https://api.github.com/repos/whatyouhide/elixir/tags","blobs_url":"https://api.github.com/repos/whatyouhide/elixir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whatyouhide/elixir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whatyouhide/elixir/git/refs{/sha}","trees_url":"https://api.github.com/repos/whatyouhide/elixir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whatyouhide/elixir/statuses/{sha}","languages_url":"https://api.github.com/repos/whatyouhide/elixir/languages","stargazers_url":"https://api.github.com/repos/whatyouhide/elixir/stargazers","contributors_url":"https://api.github.com/repos/whatyouhide/elixir/contributors","subscribers_url":"https://api.github.com/repos/whatyouhide/elixir/subscribers","subscription_url":"https://api.github.com/repos/whatyouhide/elixir/subscription","commits_url":"https://api.github.com/repos/whatyouhide/elixir/commits{/sha}","git_commits_url":"https://api.github.com/repos/whatyouhide/elixir/git/commits{/sha}","comments_url":"https://api.github.com/repos/whatyouhide/elixir/comments{/number}","issue_comment_url":"https://api.github.com/repos/whatyouhide/elixir/issues/comments{/number}","contents_url":"https://api.github.com/repos/whatyouhide/elixir/contents/{+path}","compare_url":"https://api.github.com/repos/whatyouhide/elixir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whatyouhide/elixir/merges","archive_url":"https://api.github.com/repos/whatyouhide/elixir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whatyouhide/elixir/downloads","issues_url":"https://api.github.com/repos/whatyouhide/elixir/issues{/number}","pulls_url":"https://api.github.com/repos/whatyouhide/elixir/pulls{/number}","milestones_url":"https://api.github.com/repos/whatyouhide/elixir/milestones{/number}","notifications_url":"https://api.github.com/repos/whatyouhide/elixir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whatyouhide/elixir/labels{/name}","releases_url":"https://api.github.com/repos/whatyouhide/elixir/releases{/id}","created_at":"2014-12-10T00:12:42Z","updated_at":"2015-02-14T09:28:19Z","pushed_at":"2016-01-16T18:35:06Z","git_url":"git://github.com/whatyouhide/elixir.git","ssh_url":"git@github.com:whatyouhide/elixir.git","clone_url":"https://github.com/whatyouhide/elixir.git","svn_url":"https://github.com/whatyouhide/elixir","homepage":"http://elixir-lang.org/","size":32728,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elixir-lang:master","ref":"master","sha":"a43e6fcdaa77970d074665f7aba6b2595fbf00c5","user":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars.githubusercontent.com/u/1481354?v=3","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":1234714,"name":"elixir","full_name":"elixir-lang/elixir","owner":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars.githubusercontent.com/u/1481354?v=3","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elixir-lang/elixir","description":"Elixir is a dynamic, functional language designed for building scalable and maintainable applications","fork":false,"url":"https://api.github.com/repos/elixir-lang/elixir","forks_url":"https://api.github.com/repos/elixir-lang/elixir/forks","keys_url":"https://api.github.com/repos/elixir-lang/elixir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elixir-lang/elixir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elixir-lang/elixir/teams","hooks_url":"https://api.github.com/repos/elixir-lang/elixir/hooks","issue_events_url":"https://api.github.com/repos/elixir-lang/elixir/issues/events{/number}","events_url":"https://api.github.com/repos/elixir-lang/elixir/events","assignees_url":"https://api.github.com/repos/elixir-lang/elixir/assignees{/user}","branches_url":"https://api.github.com/repos/elixir-lang/elixir/branches{/branch}","tags_url":"https://api.github.com/repos/elixir-lang/elixir/tags","blobs_url":"https://api.github.com/repos/elixir-lang/elixir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elixir-lang/elixir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elixir-lang/elixir/git/refs{/sha}","trees_url":"https://api.github.com/repos/elixir-lang/elixir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elixir-lang/elixir/statuses/{sha}","languages_url":"https://api.github.com/repos/elixir-lang/elixir/languages","stargazers_url":"https://api.github.com/repos/elixir-lang/elixir/stargazers","contributors_url":"https://api.github.com/repos/elixir-lang/elixir/contributors","subscribers_url":"https://api.github.com/repos/elixir-lang/elixir/subscribers","subscription_url":"https://api.github.com/repos/elixir-lang/elixir/subscription","commits_url":"https://api.github.com/repos/elixir-lang/elixir/commits{/sha}","git_commits_url":"https://api.github.com/repos/elixir-lang/elixir/git/commits{/sha}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/comments{/number}","issue_comment_url":"https://api.github.com/repos/elixir-lang/elixir/issues/comments{/number}","contents_url":"https://api.github.com/repos/elixir-lang/elixir/contents/{+path}","compare_url":"https://api.github.com/repos/elixir-lang/elixir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elixir-lang/elixir/merges","archive_url":"https://api.github.com/repos/elixir-lang/elixir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elixir-lang/elixir/downloads","issues_url":"https://api.github.com/repos/elixir-lang/elixir/issues{/number}","pulls_url":"https://api.github.com/repos/elixir-lang/elixir/pulls{/number}","milestones_url":"https://api.github.com/repos/elixir-lang/elixir/milestones{/number}","notifications_url":"https://api.github.com/repos/elixir-lang/elixir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elixir-lang/elixir/labels{/name}","releases_url":"https://api.github.com/repos/elixir-lang/elixir/releases{/id}","created_at":"2011-01-09T08:43:57Z","updated_at":"2016-01-20T11:18:23Z","pushed_at":"2016-01-20T09:37:30Z","git_url":"git://github.com/elixir-lang/elixir.git","ssh_url":"git@github.com:elixir-lang/elixir.git","clone_url":"https://github.com/elixir-lang/elixir.git","svn_url":"https://github.com/elixir-lang/elixir","homepage":"http://elixir-lang.org/","size":41335,"stargazers_count":6029,"watchers_count":6029,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":829,"mirror_url":null,"open_issues_count":47,"forks":829,"open_issues":47,"watchers":6029,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/4134"},"html":{"href":"https://github.com/elixir-lang/elixir/pull/4134"},"issue":{"href":"https://api.github.com/repos/elixir-lang/elixir/issues/4134"},"comments":{"href":"https://api.github.com/repos/elixir-lang/elixir/issues/4134/comments"},"review_comments":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/4134/comments"},"review_comment":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/4134/commits"},"statuses":{"href":"https://api.github.com/repos/elixir-lang/elixir/statuses/55e6e9b47ff18c1a314e28d507d6d04159b7bbe4"}}}}