{"action":"created","issue":{"url":"https://api.github.com/repos/sbt/sbt/issues/2818","repository_url":"https://api.github.com/repos/sbt/sbt","labels_url":"https://api.github.com/repos/sbt/sbt/issues/2818/labels{/name}","comments_url":"https://api.github.com/repos/sbt/sbt/issues/2818/comments","events_url":"https://api.github.com/repos/sbt/sbt/issues/2818/events","html_url":"https://github.com/sbt/sbt/issues/2818","id":186460642,"number":2818,"title":"[sbt 0.13.13] incorrect deprecated message","user":{"login":"xuwei-k","id":389787,"avatar_url":"https://avatars.githubusercontent.com/u/389787?v=3","gravatar_id":"","url":"https://api.github.com/users/xuwei-k","html_url":"https://github.com/xuwei-k","followers_url":"https://api.github.com/users/xuwei-k/followers","following_url":"https://api.github.com/users/xuwei-k/following{/other_user}","gists_url":"https://api.github.com/users/xuwei-k/gists{/gist_id}","starred_url":"https://api.github.com/users/xuwei-k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xuwei-k/subscriptions","organizations_url":"https://api.github.com/users/xuwei-k/orgs","repos_url":"https://api.github.com/users/xuwei-k/repos","events_url":"https://api.github.com/users/xuwei-k/events{/privacy}","received_events_url":"https://api.github.com/users/xuwei-k/received_events","type":"User","site_admin":false},"labels":[{"id":118566,"url":"https://api.github.com/repos/sbt/sbt/labels/Bug","name":"Bug","color":"e10c02","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/sbt/sbt/milestones/22","html_url":"https://github.com/sbt/sbt/milestones/0.13.14","labels_url":"https://api.github.com/repos/sbt/sbt/milestones/22/labels","id":2100410,"number":22,"title":"0.13.14","description":"","creator":{"login":"eed3si9n","id":184683,"avatar_url":"https://avatars.githubusercontent.com/u/184683?v=3","gravatar_id":"","url":"https://api.github.com/users/eed3si9n","html_url":"https://github.com/eed3si9n","followers_url":"https://api.github.com/users/eed3si9n/followers","following_url":"https://api.github.com/users/eed3si9n/following{/other_user}","gists_url":"https://api.github.com/users/eed3si9n/gists{/gist_id}","starred_url":"https://api.github.com/users/eed3si9n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eed3si9n/subscriptions","organizations_url":"https://api.github.com/users/eed3si9n/orgs","repos_url":"https://api.github.com/users/eed3si9n/repos","events_url":"https://api.github.com/users/eed3si9n/events{/privacy}","received_events_url":"https://api.github.com/users/eed3si9n/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":2,"state":"open","created_at":"2016-10-28T18:35:40Z","updated_at":"2016-11-12T01:11:25Z","due_on":"2016-12-16T00:00:00Z","closed_at":null},"comments":4,"created_at":"2016-11-01T05:12:52Z","updated_at":"2016-11-16T18:06:46Z","closed_at":null,"body":"## steps\r\n\r\n`build.sbt`\r\n\r\n```scala\r\nval x = SettingKey[Seq[Task[Int]]](\"x\")\r\n\r\nval y = TaskKey[Int](\"y\")\r\n\r\nx := Nil\r\n\r\ny := 42\r\n\r\nx <+= y\r\n```\r\n\r\n`project/plugin.sbt`\r\n\r\n```scala\r\nscalacOptions += \"-deprecation\"\r\n```\r\n\r\n\r\n`project/build.properties`\r\n\r\n```\r\nsbt.version=0.13.13\r\n```\r\n\r\nsbt 0.13.13 says follow\r\n\r\n```\r\nbuild.sbt:9: warning: `<+=` operator is deprecated. Use `lhs += { x.value }`.\r\nx <+= y\r\n  ^\r\n```\r\n\r\nI modified `build.sbt` and reload\r\n\r\n```diff\r\n- x <+= y\r\n+ x += y.value\r\n```\r\n\r\n```\r\nbuild.sbt:9: error: No implicit for Append.Value[Seq[sbt.Task[Int]], Int] found,\r\n  so Int cannot be appended to Seq[sbt.Task[Int]]\r\nx += y.value\r\n  ^\r\n[error] Type error in expression\r\nProject loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?\r\n```\r\n\r\n## problem\r\n\r\n```Use `lhs += { x.value }` ``` is incorrect message.\r\n\r\n## expectation\r\n\r\n`x += y.taskValue` is right way in this case.\r\n"},"comment":{"url":"https://api.github.com/repos/sbt/sbt/issues/comments/261023678","html_url":"https://github.com/sbt/sbt/issues/2818#issuecomment-261023678","issue_url":"https://api.github.com/repos/sbt/sbt/issues/2818","id":261023678,"user":{"login":"NicolasRouquette","id":2359166,"avatar_url":"https://avatars.githubusercontent.com/u/2359166?v=3","gravatar_id":"","url":"https://api.github.com/users/NicolasRouquette","html_url":"https://github.com/NicolasRouquette","followers_url":"https://api.github.com/users/NicolasRouquette/followers","following_url":"https://api.github.com/users/NicolasRouquette/following{/other_user}","gists_url":"https://api.github.com/users/NicolasRouquette/gists{/gist_id}","starred_url":"https://api.github.com/users/NicolasRouquette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicolasRouquette/subscriptions","organizations_url":"https://api.github.com/users/NicolasRouquette/orgs","repos_url":"https://api.github.com/users/NicolasRouquette/repos","events_url":"https://api.github.com/users/NicolasRouquette/events{/privacy}","received_events_url":"https://api.github.com/users/NicolasRouquette/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T18:06:46Z","updated_at":"2016-11-16T18:06:46Z","body":"What about `dependsOn`like this:\r\n\r\n(0) Using the deprecated `dependsOn`:\r\n\r\n```sbt\r\nlazy val zipFile = taskKey[File](\"A zip file to be created as an artifact to be published\")\r\n\r\nlazy val makeZip = taskKey[Unit](\"Create the contents of the zipFile\")\r\n\r\npublish <<= publish dependsOn makeZip\r\n```\r\n\r\nIt is unclear whether it should be refactored as:\r\n\r\n1) Using `.value`:\r\n\r\n```sbt\r\nlazy val zipFile = taskKey[File](\"A zip file to be created as an artifact to be published\")\r\n\r\nlazy val makeZip = taskKey[Unit](\"Create the contents of the zipFile\")\r\n\r\npublish := {\r\n  val _ = makeZip.value\r\n  publish.value\r\n}\r\n```\r\n\r\n2) Using `.taskValue`:\r\n\r\n\r\n```sbt\r\nlazy val zipFile = taskKey[File](\"A zip file to be created as an artifact to be published\")\r\n\r\nlazy val makeZip = taskKey[Unit](\"Create the contents of the zipFile\")\r\n\r\npublish := {\r\n  val _ = makeZip.taskValue\r\n  publish.value\r\n}\r\n```\r\n \r\nI think (1) is correct; however, @eed3si9n's comments make me wonder what's the criteria to use.\r\n"}}
{"actor":{"display_login":"NicolasRouquette"}}