{"action":"created","comment":{"url":"https://api.github.com/repos/gradle/kotlin-dsl/pulls/comments/239499695","pull_request_review_id":182294910,"id":239499695,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTQ5OTY5NQ==","diff_hunk":"@@ -0,0 +1,96 @@\n+/*\n+ * Copyright 2018 the original author or authors.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package org.gradle.kotlin.dsl.resolver\n+\n+import org.gradle.kotlin.dsl.concurrent.RessurectingThread\n+import org.gradle.kotlin.dsl.tooling.models.KotlinBuildScriptModel\n+\n+import kotlin.coroutines.Continuation\n+import kotlin.coroutines.suspendCoroutine\n+\n+\n+private\n+typealias AsyncModelRequest = Pair<KotlinBuildScriptModelRequest, Continuation<KotlinBuildScriptModel?>>\n+\n+\n+internal\n+open class KotlinBuildScriptModelRepository {\n+\n+    open suspend fun scriptModelFor(request: KotlinBuildScriptModelRequest): KotlinBuildScriptModel? =\n+        suspendCoroutine { k ->\n+            accept(request, k)\n+            processor.poke()\n+        }\n+\n+    protected\n+    open fun accept(request: KotlinBuildScriptModelRequest, k: Continuation<KotlinBuildScriptModel?>) {\n+        q.push(request to k)\n+    }\n+\n+    protected\n+    open fun fetch(request: KotlinBuildScriptModelRequest): KotlinBuildScriptModel =\n+        fetchKotlinBuildScriptModelFor(request)\n+\n+    private\n+    val q = ConcurrentGroupingQueue<AsyncModelRequest> {\n+        first.scriptFile == it.first.scriptFile && first.projectDir == it.first.projectDir\n+    }\n+\n+    private\n+    val processor = RessurectingThread(\"Kotlin DSL Resolver\") {\n+        while (true) {","path":"subprojects/provider/src/main/kotlin/org/gradle/kotlin/dsl/resolver/KotlinBuildScriptModelRepository.kt","position":55,"original_position":55,"commit_id":"a6e7cc0b327175eef4d772c2db01ee2c400d5dd9","original_commit_id":"a6e7cc0b327175eef4d772c2db01ee2c400d5dd9","user":{"login":"JLLeitschuh","id":1323708,"node_id":"MDQ6VXNlcjEzMjM3MDg=","avatar_url":"https://avatars2.githubusercontent.com/u/1323708?v=4","gravatar_id":"","url":"https://api.github.com/users/JLLeitschuh","html_url":"https://github.com/JLLeitschuh","followers_url":"https://api.github.com/users/JLLeitschuh/followers","following_url":"https://api.github.com/users/JLLeitschuh/following{/other_user}","gists_url":"https://api.github.com/users/JLLeitschuh/gists{/gist_id}","starred_url":"https://api.github.com/users/JLLeitschuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JLLeitschuh/subscriptions","organizations_url":"https://api.github.com/users/JLLeitschuh/orgs","repos_url":"https://api.github.com/users/JLLeitschuh/repos","events_url":"https://api.github.com/users/JLLeitschuh/events{/privacy}","received_events_url":"https://api.github.com/users/JLLeitschuh/received_events","type":"User","site_admin":false},"body":"Do you want to do `while (!Thread.currentThread().isInterupted)` here?","created_at":"2018-12-06T15:38:27Z","updated_at":"2018-12-06T15:55:18Z","html_url":"https://github.com/gradle/kotlin-dsl/pull/1283#discussion_r239499695","pull_request_url":"https://api.github.com/repos/gradle/kotlin-dsl/pulls/1283","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/gradle/kotlin-dsl/pulls/comments/239499695"},"html":{"href":"https://github.com/gradle/kotlin-dsl/pull/1283#discussion_r239499695"},"pull_request":{"href":"https://api.github.com/repos/gradle/kotlin-dsl/pulls/1283"}}},"pull_request":{"url":"https://api.github.com/repos/gradle/kotlin-dsl/pulls/1283","id":236509490,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2NTA5NDkw","html_url":"https://github.com/gradle/kotlin-dsl/pull/1283","diff_url":"https://github.com/gradle/kotlin-dsl/pull/1283.diff","patch_url":"https://github.com/gradle/kotlin-dsl/pull/1283.patch","issue_url":"https://api.github.com/repos/gradle/kotlin-dsl/issues/1283","number":1283,"state":"open","locked":false,"title":"WIP: Let script dependencies resolver prioritise requests by recency","user":{"login":"bamboo","id":51689,"node_id":"MDQ6VXNlcjUxNjg5","avatar_url":"https://avatars1.githubusercontent.com/u/51689?v=4","gravatar_id":"","url":"https://api.github.com/users/bamboo","html_url":"https://github.com/bamboo","followers_url":"https://api.github.com/users/bamboo/followers","following_url":"https://api.github.com/users/bamboo/following{/other_user}","gists_url":"https://api.github.com/users/bamboo/gists{/gist_id}","starred_url":"https://api.github.com/users/bamboo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bamboo/subscriptions","organizations_url":"https://api.github.com/users/bamboo/orgs","repos_url":"https://api.github.com/users/bamboo/repos","events_url":"https://api.github.com/users/bamboo/events{/privacy}","received_events_url":"https://api.github.com/users/bamboo/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-06T12:16:23Z","updated_at":"2018-12-06T15:55:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"874b105bba000c21ce77f5a474d6b00aa6038077","assignee":{"login":"bamboo","id":51689,"node_id":"MDQ6VXNlcjUxNjg5","avatar_url":"https://avatars1.githubusercontent.com/u/51689?v=4","gravatar_id":"","url":"https://api.github.com/users/bamboo","html_url":"https://github.com/bamboo","followers_url":"https://api.github.com/users/bamboo/followers","following_url":"https://api.github.com/users/bamboo/following{/other_user}","gists_url":"https://api.github.com/users/bamboo/gists{/gist_id}","starred_url":"https://api.github.com/users/bamboo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bamboo/subscriptions","organizations_url":"https://api.github.com/users/bamboo/orgs","repos_url":"https://api.github.com/users/bamboo/repos","events_url":"https://api.github.com/users/bamboo/events{/privacy}","received_events_url":"https://api.github.com/users/bamboo/received_events","type":"User","site_admin":false},"assignees":[{"login":"bamboo","id":51689,"node_id":"MDQ6VXNlcjUxNjg5","avatar_url":"https://avatars1.githubusercontent.com/u/51689?v=4","gravatar_id":"","url":"https://api.github.com/users/bamboo","html_url":"https://github.com/bamboo","followers_url":"https://api.github.com/users/bamboo/followers","following_url":"https://api.github.com/users/bamboo/following{/other_user}","gists_url":"https://api.github.com/users/bamboo/gists{/gist_id}","starred_url":"https://api.github.com/users/bamboo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bamboo/subscriptions","organizations_url":"https://api.github.com/users/bamboo/orgs","repos_url":"https://api.github.com/users/bamboo/repos","events_url":"https://api.github.com/users/bamboo/events{/privacy}","received_events_url":"https://api.github.com/users/bamboo/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gradle/kotlin-dsl/pulls/1283/commits","review_comments_url":"https://api.github.com/repos/gradle/kotlin-dsl/pulls/1283/comments","review_comment_url":"https://api.github.com/repos/gradle/kotlin-dsl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gradle/kotlin-dsl/issues/1283/comments","statuses_url":"https://api.github.com/repos/gradle/kotlin-dsl/statuses/a6e7cc0b327175eef4d772c2db01ee2c400d5dd9","head":{"label":"gradle:bamboo/let-resolver-prioritise-requests-by-recency","ref":"bamboo/let-resolver-prioritise-requests-by-recency","sha":"a6e7cc0b327175eef4d772c2db01ee2c400d5dd9","user":{"login":"gradle","id":124156,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDE1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/124156?v=4","gravatar_id":"","url":"https://api.github.com/users/gradle","html_url":"https://github.com/gradle","followers_url":"https://api.github.com/users/gradle/followers","following_url":"https://api.github.com/users/gradle/following{/other_user}","gists_url":"https://api.github.com/users/gradle/gists{/gist_id}","starred_url":"https://api.github.com/users/gradle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gradle/subscriptions","organizations_url":"https://api.github.com/users/gradle/orgs","repos_url":"https://api.github.com/users/gradle/repos","events_url":"https://api.github.com/users/gradle/events{/privacy}","received_events_url":"https://api.github.com/users/gradle/received_events","type":"Organization","site_admin":false},"repo":{"id":57252451,"node_id":"MDEwOlJlcG9zaXRvcnk1NzI1MjQ1MQ==","name":"kotlin-dsl","full_name":"gradle/kotlin-dsl","private":false,"owner":{"login":"gradle","id":124156,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDE1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/124156?v=4","gravatar_id":"","url":"https://api.github.com/users/gradle","html_url":"https://github.com/gradle","followers_url":"https://api.github.com/users/gradle/followers","following_url":"https://api.github.com/users/gradle/following{/other_user}","gists_url":"https://api.github.com/users/gradle/gists{/gist_id}","starred_url":"https://api.github.com/users/gradle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gradle/subscriptions","organizations_url":"https://api.github.com/users/gradle/orgs","repos_url":"https://api.github.com/users/gradle/repos","events_url":"https://api.github.com/users/gradle/events{/privacy}","received_events_url":"https://api.github.com/users/gradle/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/gradle/kotlin-dsl","description":"Kotlin language support for Gradle build scripts","fork":false,"url":"https://api.github.com/repos/gradle/kotlin-dsl","forks_url":"https://api.github.com/repos/gradle/kotlin-dsl/forks","keys_url":"https://api.github.com/repos/gradle/kotlin-dsl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gradle/kotlin-dsl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gradle/kotlin-dsl/teams","hooks_url":"https://api.github.com/repos/gradle/kotlin-dsl/hooks","issue_events_url":"https://api.github.com/repos/gradle/kotlin-dsl/issues/events{/number}","events_url":"https://api.github.com/repos/gradle/kotlin-dsl/events","assignees_url":"https://api.github.com/repos/gradle/kotlin-dsl/assignees{/user}","branches_url":"https://api.github.com/repos/gradle/kotlin-dsl/branches{/branch}","tags_url":"https://api.github.com/repos/gradle/kotlin-dsl/tags","blobs_url":"https://api.github.com/repos/gradle/kotlin-dsl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gradle/kotlin-dsl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gradle/kotlin-dsl/git/refs{/sha}","trees_url":"https://api.github.com/repos/gradle/kotlin-dsl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gradle/kotlin-dsl/statuses/{sha}","languages_url":"https://api.github.com/repos/gradle/kotlin-dsl/languages","stargazers_url":"https://api.github.com/repos/gradle/kotlin-dsl/stargazers","contributors_url":"https://api.github.com/repos/gradle/kotlin-dsl/contributors","subscribers_url":"https://api.github.com/repos/gradle/kotlin-dsl/subscribers","subscription_url":"https://api.github.com/repos/gradle/kotlin-dsl/subscription","commits_url":"https://api.github.com/repos/gradle/kotlin-dsl/commits{/sha}","git_commits_url":"https://api.github.com/repos/gradle/kotlin-dsl/git/commits{/sha}","comments_url":"https://api.github.com/repos/gradle/kotlin-dsl/comments{/number}","issue_comment_url":"https://api.github.com/repos/gradle/kotlin-dsl/issues/comments{/number}","contents_url":"https://api.github.com/repos/gradle/kotlin-dsl/contents/{+path}","compare_url":"https://api.github.com/repos/gradle/kotlin-dsl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gradle/kotlin-dsl/merges","archive_url":"https://api.github.com/repos/gradle/kotlin-dsl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gradle/kotlin-dsl/downloads","issues_url":"https://api.github.com/repos/gradle/kotlin-dsl/issues{/number}","pulls_url":"https://api.github.com/repos/gradle/kotlin-dsl/pulls{/number}","milestones_url":"https://api.github.com/repos/gradle/kotlin-dsl/milestones{/number}","notifications_url":"https://api.github.com/repos/gradle/kotlin-dsl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gradle/kotlin-dsl/labels{/name}","releases_url":"https://api.github.com/repos/gradle/kotlin-dsl/releases{/id}","deployments_url":"https://api.github.com/repos/gradle/kotlin-dsl/deployments","created_at":"2016-04-27T22:16:07Z","updated_at":"2018-12-06T15:49:38Z","pushed_at":"2018-12-06T15:03:16Z","git_url":"git://github.com/gradle/kotlin-dsl.git","ssh_url":"git@github.com:gradle/kotlin-dsl.git","clone_url":"https://github.com/gradle/kotlin-dsl.git","svn_url":"https://github.com/gradle/kotlin-dsl","homepage":"http://gradle.org/blog/kotlin-meets-gradle","size":8037,"stargazers_count":2139,"watchers_count":2139,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":229,"mirror_url":null,"archived":false,"open_issues_count":170,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":229,"open_issues":170,"watchers":2139,"default_branch":"master"}},"base":{"label":"gradle:develop","ref":"develop","sha":"ae05209d245e825d3521b2f3e99e7c05ae1a4052","user":{"login":"gradle","id":124156,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDE1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/124156?v=4","gravatar_id":"","url":"https://api.github.com/users/gradle","html_url":"https://github.com/gradle","followers_url":"https://api.github.com/users/gradle/followers","following_url":"https://api.github.com/users/gradle/following{/other_user}","gists_url":"https://api.github.com/users/gradle/gists{/gist_id}","starred_url":"https://api.github.com/users/gradle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gradle/subscriptions","organizations_url":"https://api.github.com/users/gradle/orgs","repos_url":"https://api.github.com/users/gradle/repos","events_url":"https://api.github.com/users/gradle/events{/privacy}","received_events_url":"https://api.github.com/users/gradle/received_events","type":"Organization","site_admin":false},"repo":{"id":57252451,"node_id":"MDEwOlJlcG9zaXRvcnk1NzI1MjQ1MQ==","name":"kotlin-dsl","full_name":"gradle/kotlin-dsl","private":false,"owner":{"login":"gradle","id":124156,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDE1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/124156?v=4","gravatar_id":"","url":"https://api.github.com/users/gradle","html_url":"https://github.com/gradle","followers_url":"https://api.github.com/users/gradle/followers","following_url":"https://api.github.com/users/gradle/following{/other_user}","gists_url":"https://api.github.com/users/gradle/gists{/gist_id}","starred_url":"https://api.github.com/users/gradle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gradle/subscriptions","organizations_url":"https://api.github.com/users/gradle/orgs","repos_url":"https://api.github.com/users/gradle/repos","events_url":"https://api.github.com/users/gradle/events{/privacy}","received_events_url":"https://api.github.com/users/gradle/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/gradle/kotlin-dsl","description":"Kotlin language support for Gradle build scripts","fork":false,"url":"https://api.github.com/repos/gradle/kotlin-dsl","forks_url":"https://api.github.com/repos/gradle/kotlin-dsl/forks","keys_url":"https://api.github.com/repos/gradle/kotlin-dsl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gradle/kotlin-dsl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gradle/kotlin-dsl/teams","hooks_url":"https://api.github.com/repos/gradle/kotlin-dsl/hooks","issue_events_url":"https://api.github.com/repos/gradle/kotlin-dsl/issues/events{/number}","events_url":"https://api.github.com/repos/gradle/kotlin-dsl/events","assignees_url":"https://api.github.com/repos/gradle/kotlin-dsl/assignees{/user}","branches_url":"https://api.github.com/repos/gradle/kotlin-dsl/branches{/branch}","tags_url":"https://api.github.com/repos/gradle/kotlin-dsl/tags","blobs_url":"https://api.github.com/repos/gradle/kotlin-dsl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gradle/kotlin-dsl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gradle/kotlin-dsl/git/refs{/sha}","trees_url":"https://api.github.com/repos/gradle/kotlin-dsl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gradle/kotlin-dsl/statuses/{sha}","languages_url":"https://api.github.com/repos/gradle/kotlin-dsl/languages","stargazers_url":"https://api.github.com/repos/gradle/kotlin-dsl/stargazers","contributors_url":"https://api.github.com/repos/gradle/kotlin-dsl/contributors","subscribers_url":"https://api.github.com/repos/gradle/kotlin-dsl/subscribers","subscription_url":"https://api.github.com/repos/gradle/kotlin-dsl/subscription","commits_url":"https://api.github.com/repos/gradle/kotlin-dsl/commits{/sha}","git_commits_url":"https://api.github.com/repos/gradle/kotlin-dsl/git/commits{/sha}","comments_url":"https://api.github.com/repos/gradle/kotlin-dsl/comments{/number}","issue_comment_url":"https://api.github.com/repos/gradle/kotlin-dsl/issues/comments{/number}","contents_url":"https://api.github.com/repos/gradle/kotlin-dsl/contents/{+path}","compare_url":"https://api.github.com/repos/gradle/kotlin-dsl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gradle/kotlin-dsl/merges","archive_url":"https://api.github.com/repos/gradle/kotlin-dsl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gradle/kotlin-dsl/downloads","issues_url":"https://api.github.com/repos/gradle/kotlin-dsl/issues{/number}","pulls_url":"https://api.github.com/repos/gradle/kotlin-dsl/pulls{/number}","milestones_url":"https://api.github.com/repos/gradle/kotlin-dsl/milestones{/number}","notifications_url":"https://api.github.com/repos/gradle/kotlin-dsl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gradle/kotlin-dsl/labels{/name}","releases_url":"https://api.github.com/repos/gradle/kotlin-dsl/releases{/id}","deployments_url":"https://api.github.com/repos/gradle/kotlin-dsl/deployments","created_at":"2016-04-27T22:16:07Z","updated_at":"2018-12-06T15:49:38Z","pushed_at":"2018-12-06T15:03:16Z","git_url":"git://github.com/gradle/kotlin-dsl.git","ssh_url":"git@github.com:gradle/kotlin-dsl.git","clone_url":"https://github.com/gradle/kotlin-dsl.git","svn_url":"https://github.com/gradle/kotlin-dsl","homepage":"http://gradle.org/blog/kotlin-meets-gradle","size":8037,"stargazers_count":2139,"watchers_count":2139,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":229,"mirror_url":null,"archived":false,"open_issues_count":170,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":229,"open_issues":170,"watchers":2139,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gradle/kotlin-dsl/pulls/1283"},"html":{"href":"https://github.com/gradle/kotlin-dsl/pull/1283"},"issue":{"href":"https://api.github.com/repos/gradle/kotlin-dsl/issues/1283"},"comments":{"href":"https://api.github.com/repos/gradle/kotlin-dsl/issues/1283/comments"},"review_comments":{"href":"https://api.github.com/repos/gradle/kotlin-dsl/pulls/1283/comments"},"review_comment":{"href":"https://api.github.com/repos/gradle/kotlin-dsl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gradle/kotlin-dsl/pulls/1283/commits"},"statuses":{"href":"https://api.github.com/repos/gradle/kotlin-dsl/statuses/a6e7cc0b327175eef4d772c2db01ee2c400d5dd9"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"JLLeitschuh"}}