{"action":"created","comment":{"url":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/comments/52837309","id":52837309,"diff_hunk":"@@ -78,62 +78,58 @@ class TaskTest extends UnitSpec with LazyLogging {\n    * Example #1: a \"lazy task\" that doesn't have all of its required inputs until\n    * a previous task on which it is dependent has getTasks called.\n    */\n+  object Callbacks {}\n   {\n \n-    \"Dagr\" should \"support a task data connector between two tasks set in getTasks\" in {\n+    \"Dagr\" should \"support a linker between two tasks set in getTasks\" in {\n       val firstTask = new FirstTaskNeedsBuilding()\n       val lazyTask = new LazyTask(sleepTime = None)\n-      Callbacks.connect(lazyTask, firstTask)((l,f) => l.sleepTime = f.sleepTime)\n+      firstTask ==> Linker(firstTask, lazyTask){(f,l) => l.sleepTime = f.sleepTime} ==> lazyTask\n+\n       // so now lazyTask depends on the number from firstTask being not None\n-      firstTask.invokeCallbacks()\n       firstTask.applyResources(ResourceSet.infinite)\n       firstTask.sleepTime should be ('defined)\n-      lazyTask.invokeCallbacks()\n+      firstTask.tasksDependingOnThisTask.foreach(t => t.asInstanceOf[InJvmTask].inJvmMethod())\n       lazyTask.getTasks should have size 1\n     }\n \n     it should \"fail if a task data connector set in getTasks is not yet available\" in {\n       val firstTask = new FirstTaskNeedsBuilding()\n       val lazyTask = new LazyTask(sleepTime = firstTask.sleepTime)\n-      Callbacks.connect(lazyTask, firstTask)((l,f) => l.sleepTime = f.sleepTime)\n-      // So now lazyTask depends on the number from firstTask being not None.\n-      // If we call lazyTask.getTasks, it will call firstTask.getNumber, which will fail,\n-      // since fistTask.number is None.\n-      lazyTask.invokeCallbacks()\n-      an[RuntimeException] should be thrownBy lazyTask.applyResources(ResourceSet.infinite)\n+\n+      // Linker is purposefully backwards","path":"core/src/test/scala/dagr/core/tasksystem/TaskTest.scala","position":33,"original_position":33,"commit_id":"89e83df59776c7c3df409e6ea2f7f8a213cc987b","original_commit_id":"89e83df59776c7c3df409e6ea2f7f8a213cc987b","user":{"login":"nh13","id":846274,"avatar_url":"https://avatars.githubusercontent.com/u/846274?v=3","gravatar_id":"","url":"https://api.github.com/users/nh13","html_url":"https://github.com/nh13","followers_url":"https://api.github.com/users/nh13/followers","following_url":"https://api.github.com/users/nh13/following{/other_user}","gists_url":"https://api.github.com/users/nh13/gists{/gist_id}","starred_url":"https://api.github.com/users/nh13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nh13/subscriptions","organizations_url":"https://api.github.com/users/nh13/orgs","repos_url":"https://api.github.com/users/nh13/repos","events_url":"https://api.github.com/users/nh13/events{/privacy}","received_events_url":"https://api.github.com/users/nh13/received_events","type":"User","site_admin":false},"body":"add to the comment that you *set it up to fail* not that the Linker is inherently supposed to be used backwards.  I read tests to figure how to use things sometimes, and this would confuse me.","created_at":"2016-02-14T03:25:57Z","updated_at":"2016-02-14T03:25:57Z","html_url":"https://github.com/fulcrumgenomics/dagr/pull/97#discussion_r52837309","pull_request_url":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/97","_links":{"self":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/comments/52837309"},"html":{"href":"https://github.com/fulcrumgenomics/dagr/pull/97#discussion_r52837309"},"pull_request":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/97"}}},"pull_request":{"url":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/97","id":59264525,"html_url":"https://github.com/fulcrumgenomics/dagr/pull/97","diff_url":"https://github.com/fulcrumgenomics/dagr/pull/97.diff","patch_url":"https://github.com/fulcrumgenomics/dagr/pull/97.patch","issue_url":"https://api.github.com/repos/fulcrumgenomics/dagr/issues/97","number":97,"state":"open","locked":false,"title":"Removed Callbacks and replaced with much simpler Linker concept.","user":{"login":"tfenne","id":1609210,"avatar_url":"https://avatars.githubusercontent.com/u/1609210?v=3","gravatar_id":"","url":"https://api.github.com/users/tfenne","html_url":"https://github.com/tfenne","followers_url":"https://api.github.com/users/tfenne/followers","following_url":"https://api.github.com/users/tfenne/following{/other_user}","gists_url":"https://api.github.com/users/tfenne/gists{/gist_id}","starred_url":"https://api.github.com/users/tfenne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfenne/subscriptions","organizations_url":"https://api.github.com/users/tfenne/orgs","repos_url":"https://api.github.com/users/tfenne/repos","events_url":"https://api.github.com/users/tfenne/events{/privacy}","received_events_url":"https://api.github.com/users/tfenne/received_events","type":"User","site_admin":false},"body":"@nh13 The actual implementation of `Linker` is tiny.  Most of the changes are from\r\n1. ripping out `Callbacks`\r\n2. converting everything over from Callbacks to Linker\r\n3. tidying up SimplerInJvmTask.apply()\r\n\r\nThe name `Linker` seems fine to me, but if you have better suggestions let me know.","created_at":"2016-02-13T10:43:00Z","updated_at":"2016-02-14T03:25:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8e9b2ad2ffc018f09e0bffb221e4226dc413f96","assignee":{"login":"nh13","id":846274,"avatar_url":"https://avatars.githubusercontent.com/u/846274?v=3","gravatar_id":"","url":"https://api.github.com/users/nh13","html_url":"https://github.com/nh13","followers_url":"https://api.github.com/users/nh13/followers","following_url":"https://api.github.com/users/nh13/following{/other_user}","gists_url":"https://api.github.com/users/nh13/gists{/gist_id}","starred_url":"https://api.github.com/users/nh13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nh13/subscriptions","organizations_url":"https://api.github.com/users/nh13/orgs","repos_url":"https://api.github.com/users/nh13/repos","events_url":"https://api.github.com/users/nh13/events{/privacy}","received_events_url":"https://api.github.com/users/nh13/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/97/commits","review_comments_url":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/97/comments","review_comment_url":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fulcrumgenomics/dagr/issues/97/comments","statuses_url":"https://api.github.com/repos/fulcrumgenomics/dagr/statuses/89e83df59776c7c3df409e6ea2f7f8a213cc987b","head":{"label":"fulcrumgenomics:tf_linkers","ref":"tf_linkers","sha":"89e83df59776c7c3df409e6ea2f7f8a213cc987b","user":{"login":"fulcrumgenomics","id":13546013,"avatar_url":"https://avatars.githubusercontent.com/u/13546013?v=3","gravatar_id":"","url":"https://api.github.com/users/fulcrumgenomics","html_url":"https://github.com/fulcrumgenomics","followers_url":"https://api.github.com/users/fulcrumgenomics/followers","following_url":"https://api.github.com/users/fulcrumgenomics/following{/other_user}","gists_url":"https://api.github.com/users/fulcrumgenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/fulcrumgenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fulcrumgenomics/subscriptions","organizations_url":"https://api.github.com/users/fulcrumgenomics/orgs","repos_url":"https://api.github.com/users/fulcrumgenomics/repos","events_url":"https://api.github.com/users/fulcrumgenomics/events{/privacy}","received_events_url":"https://api.github.com/users/fulcrumgenomics/received_events","type":"Organization","site_admin":false},"repo":{"id":50968977,"name":"dagr","full_name":"fulcrumgenomics/dagr","owner":{"login":"fulcrumgenomics","id":13546013,"avatar_url":"https://avatars.githubusercontent.com/u/13546013?v=3","gravatar_id":"","url":"https://api.github.com/users/fulcrumgenomics","html_url":"https://github.com/fulcrumgenomics","followers_url":"https://api.github.com/users/fulcrumgenomics/followers","following_url":"https://api.github.com/users/fulcrumgenomics/following{/other_user}","gists_url":"https://api.github.com/users/fulcrumgenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/fulcrumgenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fulcrumgenomics/subscriptions","organizations_url":"https://api.github.com/users/fulcrumgenomics/orgs","repos_url":"https://api.github.com/users/fulcrumgenomics/repos","events_url":"https://api.github.com/users/fulcrumgenomics/events{/privacy}","received_events_url":"https://api.github.com/users/fulcrumgenomics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fulcrumgenomics/dagr","description":"A scala based DSL and framework for writing and executing bioinformatics pipelines as Directed Acyclic Graphs","fork":false,"url":"https://api.github.com/repos/fulcrumgenomics/dagr","forks_url":"https://api.github.com/repos/fulcrumgenomics/dagr/forks","keys_url":"https://api.github.com/repos/fulcrumgenomics/dagr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fulcrumgenomics/dagr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fulcrumgenomics/dagr/teams","hooks_url":"https://api.github.com/repos/fulcrumgenomics/dagr/hooks","issue_events_url":"https://api.github.com/repos/fulcrumgenomics/dagr/issues/events{/number}","events_url":"https://api.github.com/repos/fulcrumgenomics/dagr/events","assignees_url":"https://api.github.com/repos/fulcrumgenomics/dagr/assignees{/user}","branches_url":"https://api.github.com/repos/fulcrumgenomics/dagr/branches{/branch}","tags_url":"https://api.github.com/repos/fulcrumgenomics/dagr/tags","blobs_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/refs{/sha}","trees_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fulcrumgenomics/dagr/statuses/{sha}","languages_url":"https://api.github.com/repos/fulcrumgenomics/dagr/languages","stargazers_url":"https://api.github.com/repos/fulcrumgenomics/dagr/stargazers","contributors_url":"https://api.github.com/repos/fulcrumgenomics/dagr/contributors","subscribers_url":"https://api.github.com/repos/fulcrumgenomics/dagr/subscribers","subscription_url":"https://api.github.com/repos/fulcrumgenomics/dagr/subscription","commits_url":"https://api.github.com/repos/fulcrumgenomics/dagr/commits{/sha}","git_commits_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/commits{/sha}","comments_url":"https://api.github.com/repos/fulcrumgenomics/dagr/comments{/number}","issue_comment_url":"https://api.github.com/repos/fulcrumgenomics/dagr/issues/comments{/number}","contents_url":"https://api.github.com/repos/fulcrumgenomics/dagr/contents/{+path}","compare_url":"https://api.github.com/repos/fulcrumgenomics/dagr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fulcrumgenomics/dagr/merges","archive_url":"https://api.github.com/repos/fulcrumgenomics/dagr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fulcrumgenomics/dagr/downloads","issues_url":"https://api.github.com/repos/fulcrumgenomics/dagr/issues{/number}","pulls_url":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls{/number}","milestones_url":"https://api.github.com/repos/fulcrumgenomics/dagr/milestones{/number}","notifications_url":"https://api.github.com/repos/fulcrumgenomics/dagr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fulcrumgenomics/dagr/labels{/name}","releases_url":"https://api.github.com/repos/fulcrumgenomics/dagr/releases{/id}","deployments_url":"https://api.github.com/repos/fulcrumgenomics/dagr/deployments","created_at":"2016-02-03T02:46:27Z","updated_at":"2016-02-12T11:05:51Z","pushed_at":"2016-02-14T03:08:44Z","git_url":"git://github.com/fulcrumgenomics/dagr.git","ssh_url":"git@github.com:fulcrumgenomics/dagr.git","clone_url":"https://github.com/fulcrumgenomics/dagr.git","svn_url":"https://github.com/fulcrumgenomics/dagr","homepage":"","size":3554,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":31,"forks":0,"open_issues":31,"watchers":3,"default_branch":"master"}},"base":{"label":"fulcrumgenomics:master","ref":"master","sha":"d8f0d55a8d151fbed3380c179c3b94692198222f","user":{"login":"fulcrumgenomics","id":13546013,"avatar_url":"https://avatars.githubusercontent.com/u/13546013?v=3","gravatar_id":"","url":"https://api.github.com/users/fulcrumgenomics","html_url":"https://github.com/fulcrumgenomics","followers_url":"https://api.github.com/users/fulcrumgenomics/followers","following_url":"https://api.github.com/users/fulcrumgenomics/following{/other_user}","gists_url":"https://api.github.com/users/fulcrumgenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/fulcrumgenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fulcrumgenomics/subscriptions","organizations_url":"https://api.github.com/users/fulcrumgenomics/orgs","repos_url":"https://api.github.com/users/fulcrumgenomics/repos","events_url":"https://api.github.com/users/fulcrumgenomics/events{/privacy}","received_events_url":"https://api.github.com/users/fulcrumgenomics/received_events","type":"Organization","site_admin":false},"repo":{"id":50968977,"name":"dagr","full_name":"fulcrumgenomics/dagr","owner":{"login":"fulcrumgenomics","id":13546013,"avatar_url":"https://avatars.githubusercontent.com/u/13546013?v=3","gravatar_id":"","url":"https://api.github.com/users/fulcrumgenomics","html_url":"https://github.com/fulcrumgenomics","followers_url":"https://api.github.com/users/fulcrumgenomics/followers","following_url":"https://api.github.com/users/fulcrumgenomics/following{/other_user}","gists_url":"https://api.github.com/users/fulcrumgenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/fulcrumgenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fulcrumgenomics/subscriptions","organizations_url":"https://api.github.com/users/fulcrumgenomics/orgs","repos_url":"https://api.github.com/users/fulcrumgenomics/repos","events_url":"https://api.github.com/users/fulcrumgenomics/events{/privacy}","received_events_url":"https://api.github.com/users/fulcrumgenomics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fulcrumgenomics/dagr","description":"A scala based DSL and framework for writing and executing bioinformatics pipelines as Directed Acyclic Graphs","fork":false,"url":"https://api.github.com/repos/fulcrumgenomics/dagr","forks_url":"https://api.github.com/repos/fulcrumgenomics/dagr/forks","keys_url":"https://api.github.com/repos/fulcrumgenomics/dagr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fulcrumgenomics/dagr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fulcrumgenomics/dagr/teams","hooks_url":"https://api.github.com/repos/fulcrumgenomics/dagr/hooks","issue_events_url":"https://api.github.com/repos/fulcrumgenomics/dagr/issues/events{/number}","events_url":"https://api.github.com/repos/fulcrumgenomics/dagr/events","assignees_url":"https://api.github.com/repos/fulcrumgenomics/dagr/assignees{/user}","branches_url":"https://api.github.com/repos/fulcrumgenomics/dagr/branches{/branch}","tags_url":"https://api.github.com/repos/fulcrumgenomics/dagr/tags","blobs_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/refs{/sha}","trees_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fulcrumgenomics/dagr/statuses/{sha}","languages_url":"https://api.github.com/repos/fulcrumgenomics/dagr/languages","stargazers_url":"https://api.github.com/repos/fulcrumgenomics/dagr/stargazers","contributors_url":"https://api.github.com/repos/fulcrumgenomics/dagr/contributors","subscribers_url":"https://api.github.com/repos/fulcrumgenomics/dagr/subscribers","subscription_url":"https://api.github.com/repos/fulcrumgenomics/dagr/subscription","commits_url":"https://api.github.com/repos/fulcrumgenomics/dagr/commits{/sha}","git_commits_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/commits{/sha}","comments_url":"https://api.github.com/repos/fulcrumgenomics/dagr/comments{/number}","issue_comment_url":"https://api.github.com/repos/fulcrumgenomics/dagr/issues/comments{/number}","contents_url":"https://api.github.com/repos/fulcrumgenomics/dagr/contents/{+path}","compare_url":"https://api.github.com/repos/fulcrumgenomics/dagr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fulcrumgenomics/dagr/merges","archive_url":"https://api.github.com/repos/fulcrumgenomics/dagr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fulcrumgenomics/dagr/downloads","issues_url":"https://api.github.com/repos/fulcrumgenomics/dagr/issues{/number}","pulls_url":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls{/number}","milestones_url":"https://api.github.com/repos/fulcrumgenomics/dagr/milestones{/number}","notifications_url":"https://api.github.com/repos/fulcrumgenomics/dagr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fulcrumgenomics/dagr/labels{/name}","releases_url":"https://api.github.com/repos/fulcrumgenomics/dagr/releases{/id}","deployments_url":"https://api.github.com/repos/fulcrumgenomics/dagr/deployments","created_at":"2016-02-03T02:46:27Z","updated_at":"2016-02-12T11:05:51Z","pushed_at":"2016-02-14T03:08:44Z","git_url":"git://github.com/fulcrumgenomics/dagr.git","ssh_url":"git@github.com:fulcrumgenomics/dagr.git","clone_url":"https://github.com/fulcrumgenomics/dagr.git","svn_url":"https://github.com/fulcrumgenomics/dagr","homepage":"","size":3554,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":31,"forks":0,"open_issues":31,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/97"},"html":{"href":"https://github.com/fulcrumgenomics/dagr/pull/97"},"issue":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/issues/97"},"comments":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/issues/97/comments"},"review_comments":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/97/comments"},"review_comment":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/97/commits"},"statuses":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/statuses/89e83df59776c7c3df409e6ea2f7f8a213cc987b"}}}}