{"action":"created","comment":{"url":"https://api.github.com/repos/laserdisc-io/laserdisc/pulls/comments/207184683","pull_request_review_id":142742331,"id":207184683,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzE4NDY4Mw==","diff_hunk":"@@ -0,0 +1,38 @@\n+package laserdisc.fs2\n+\n+import cats.syntax.either._\n+import fs2.Chunk\n+import laserdisc.protocol.BitVectorDecoding._\n+import laserdisc.protocol.RESP\n+import laserdisc.|\n+import scodec.bits.BitVector\n+\n+sealed trait Frame extends Product with Serializable {\n+\n+  def append(chunk: Chunk[Byte]): Exception | NonEmptyFrame =\n+    nextFrame(BitVector.view(chunk.toByteBuffer))\n+\n+  protected final def nextFrame(bits: BitVector): Exception | NonEmptyFrame =\n+    RESP.stateOf(bits) map {\n+      case MissingBits(n)        => Incomplete(bits, n)\n+      case CompleteAndDecoded(r) => Decoded(r.value)\n+      case IncompleteVector      => Incomplete(bits, 0L)\n+      case CompleteVector        => Complete(bits)\n+    } leftMap (new Exception(_))\n+}\n+\n+sealed trait NonEmptyFrame extends Product with Serializable\n+case object Empty extends Frame","path":"fs2/src/main/scala/laserdisc/fs2/Frame.scala","position":25,"original_position":25,"commit_id":"f082b709181b78eaefb5afe24ab82b80c0d5ffd4","original_commit_id":"f082b709181b78eaefb5afe24ab82b80c0d5ffd4","user":{"login":"barambani","id":201339,"node_id":"MDQ6VXNlcjIwMTMzOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/201339?v=4","gravatar_id":"","url":"https://api.github.com/users/barambani","html_url":"https://github.com/barambani","followers_url":"https://api.github.com/users/barambani/followers","following_url":"https://api.github.com/users/barambani/following{/other_user}","gists_url":"https://api.github.com/users/barambani/gists{/gist_id}","starred_url":"https://api.github.com/users/barambani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barambani/subscriptions","organizations_url":"https://api.github.com/users/barambani/orgs","repos_url":"https://api.github.com/users/barambani/repos","events_url":"https://api.github.com/users/barambani/events{/privacy}","received_events_url":"https://api.github.com/users/barambani/received_events","type":"User","site_admin":false},"body":"this is part of the Frame coproduct. For the others (`Complete`, `Decoded`, `Incomplete`) I haven't repeated the word *frame*. In case I would change all of them, what do you think.","created_at":"2018-08-02T10:58:49Z","updated_at":"2018-08-02T10:58:50Z","html_url":"https://github.com/laserdisc-io/laserdisc/pull/13#discussion_r207184683","pull_request_url":"https://api.github.com/repos/laserdisc-io/laserdisc/pulls/13","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/laserdisc-io/laserdisc/pulls/comments/207184683"},"html":{"href":"https://github.com/laserdisc-io/laserdisc/pull/13#discussion_r207184683"},"pull_request":{"href":"https://api.github.com/repos/laserdisc-io/laserdisc/pulls/13"}},"in_reply_to_id":207134213},"pull_request":{"url":"https://api.github.com/repos/laserdisc-io/laserdisc/pulls/13","id":205422513,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NDIyNTEz","html_url":"https://github.com/laserdisc-io/laserdisc/pull/13","diff_url":"https://github.com/laserdisc-io/laserdisc/pull/13.diff","patch_url":"https://github.com/laserdisc-io/laserdisc/pull/13.patch","issue_url":"https://api.github.com/repos/laserdisc-io/laserdisc/issues/13","number":13,"state":"open","locked":false,"title":"Hotfix decode issue","user":{"login":"barambani","id":201339,"node_id":"MDQ6VXNlcjIwMTMzOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/201339?v=4","gravatar_id":"","url":"https://api.github.com/users/barambani","html_url":"https://github.com/barambani","followers_url":"https://api.github.com/users/barambani/followers","following_url":"https://api.github.com/users/barambani/following{/other_user}","gists_url":"https://api.github.com/users/barambani/gists{/gist_id}","starred_url":"https://api.github.com/users/barambani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barambani/subscriptions","organizations_url":"https://api.github.com/users/barambani/orgs","repos_url":"https://api.github.com/users/barambani/repos","events_url":"https://api.github.com/users/barambani/events{/privacy}","received_events_url":"https://api.github.com/users/barambani/received_events","type":"User","site_admin":false},"body":"This fixes a problem that prevents decoding bulk strings and arrays. Below is an example of the stack trace when the problem occurs.\r\n\r\n```\r\n[info] scodec.stream.decode.DecodingError: cannot acquire 12336 bits from a vector that contains 7336 bits\r\n[info]  at scodec.stream.decode.package$.raiseError(package.scala:27)\r\n[info]  at scodec.stream.decode.package$.$anonfun$runDecode$1(package.scala:88)\r\n[info]  at scodec.Attempt$Failure.fold(Attempt.scala:113)\r\n[info]  at scodec.stream.decode.package$.runDecode(package.scala:89)\r\n[info]  at scodec.stream.decode.package$.$anonfun$once$1(package.scala:94)\r\n[info]  at scala.Function1.$anonfun$andThen$1(Function1.scala:52)\r\n[info]  at fs2.Stream$InvariantOps$.$anonfun$flatMap$1(Stream.scala:1878)\r\n[info]  at fs2.internal.FreeC.$anonfun$flatMap$1(FreeC.scala:16)\r\n[info]  at fs2.internal.FreeC$.$anonfun$mkViewL$1(FreeC.scala:118)\r\n[info]  at fs2.internal.FreeC$.go$1(FreeC.scala:114)\r\n[info]  at fs2.internal.FreeC$.fs2$internal$FreeC$$mkViewL(FreeC.scala:121)\r\n[info]  at fs2.internal.FreeC.viewL(FreeC.scala:54)\r\n[info]  at fs2.internal.Algebra$.translate0(Algebra.scala:480)\r\n[info]  at fs2.internal.Algebra$.$anonfun$translate0$3(Algebra.scala:512)\r\n[info]  at fs2.internal.FreeC.$anonfun$transformWith$1(FreeC.scala:24)\r\n[info]  at fs2.internal.FreeC$.$anonfun$mkViewL$1(FreeC.scala:118)\r\n[info]  at fs2.internal.Algebra$.$anonfun$compileLoop$14(Algebra.scala:307)\r\n[info]  at fs2.internal.Algebra$.$anonfun$compileLoop$3(Algebra.scala:261)\r\n[info]  at cats.effect.internals.IORunLoop$.cats$effect$internals$IORunLoop$$loop(IORunLoop.scala:128)\r\n[info]  at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:310)\r\n[info]  at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:292)\r\n[info]  at cats.effect.internals.Callback$AsyncIdempotentCallback$$anon$3.run(Callback.scala:142)\r\n[info]  at cats.effect.internals.TrampolineEC.cats$effect$internals$TrampolineEC$$localRunLoop(TrampolineEC.scala:62)\r\n[info]  at cats.effect.internals.TrampolineEC.$anonfun$execute$1(TrampolineEC.scala:54)\r\n[info]  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)\r\n[info]  at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:81)\r\n[info]  at cats.effect.internals.TrampolineEC.execute(TrampolineEC.scala:54)\r\n[info]  at cats.effect.internals.Callback$AsyncIdempotentCallback.apply(Callback.scala:139)\r\n[info]  at cats.effect.internals.Callback$AsyncIdempotentCallback.apply(Callback.scala:130)\r\n[info]  at cats.effect.Async$$anon$7.run(Async.scala:163)\r\n[info]  at scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:140)\r\n[info]  at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)\r\n[info]  at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)\r\n[info]  at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)\r\n[info]  at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)\r\n[info] 2018-07-19 17:07:20,563 [WARN] [scala-execution-context-global-29] Server New server is same like the old one (127.0.0.1:6379): currently unavailable\r\n```","created_at":"2018-08-01T13:19:16Z","updated_at":"2018-08-02T10:58:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54c28602623303fe90ac604ee340f20fc924140f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/laserdisc-io/laserdisc/pulls/13/commits","review_comments_url":"https://api.github.com/repos/laserdisc-io/laserdisc/pulls/13/comments","review_comment_url":"https://api.github.com/repos/laserdisc-io/laserdisc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/laserdisc-io/laserdisc/issues/13/comments","statuses_url":"https://api.github.com/repos/laserdisc-io/laserdisc/statuses/f082b709181b78eaefb5afe24ab82b80c0d5ffd4","head":{"label":"barambani:hotfix-decode-issue","ref":"hotfix-decode-issue","sha":"f082b709181b78eaefb5afe24ab82b80c0d5ffd4","user":{"login":"barambani","id":201339,"node_id":"MDQ6VXNlcjIwMTMzOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/201339?v=4","gravatar_id":"","url":"https://api.github.com/users/barambani","html_url":"https://github.com/barambani","followers_url":"https://api.github.com/users/barambani/followers","following_url":"https://api.github.com/users/barambani/following{/other_user}","gists_url":"https://api.github.com/users/barambani/gists{/gist_id}","starred_url":"https://api.github.com/users/barambani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barambani/subscriptions","organizations_url":"https://api.github.com/users/barambani/orgs","repos_url":"https://api.github.com/users/barambani/repos","events_url":"https://api.github.com/users/barambani/events{/privacy}","received_events_url":"https://api.github.com/users/barambani/received_events","type":"User","site_admin":false},"repo":{"id":138186741,"node_id":"MDEwOlJlcG9zaXRvcnkxMzgxODY3NDE=","name":"laserdisc","full_name":"barambani/laserdisc","owner":{"login":"barambani","id":201339,"node_id":"MDQ6VXNlcjIwMTMzOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/201339?v=4","gravatar_id":"","url":"https://api.github.com/users/barambani","html_url":"https://github.com/barambani","followers_url":"https://api.github.com/users/barambani/followers","following_url":"https://api.github.com/users/barambani/following{/other_user}","gists_url":"https://api.github.com/users/barambani/gists{/gist_id}","starred_url":"https://api.github.com/users/barambani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barambani/subscriptions","organizations_url":"https://api.github.com/users/barambani/orgs","repos_url":"https://api.github.com/users/barambani/repos","events_url":"https://api.github.com/users/barambani/events{/privacy}","received_events_url":"https://api.github.com/users/barambani/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/barambani/laserdisc","description":"A(nother) Redis Client","fork":true,"url":"https://api.github.com/repos/barambani/laserdisc","forks_url":"https://api.github.com/repos/barambani/laserdisc/forks","keys_url":"https://api.github.com/repos/barambani/laserdisc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/barambani/laserdisc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/barambani/laserdisc/teams","hooks_url":"https://api.github.com/repos/barambani/laserdisc/hooks","issue_events_url":"https://api.github.com/repos/barambani/laserdisc/issues/events{/number}","events_url":"https://api.github.com/repos/barambani/laserdisc/events","assignees_url":"https://api.github.com/repos/barambani/laserdisc/assignees{/user}","branches_url":"https://api.github.com/repos/barambani/laserdisc/branches{/branch}","tags_url":"https://api.github.com/repos/barambani/laserdisc/tags","blobs_url":"https://api.github.com/repos/barambani/laserdisc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/barambani/laserdisc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/barambani/laserdisc/git/refs{/sha}","trees_url":"https://api.github.com/repos/barambani/laserdisc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/barambani/laserdisc/statuses/{sha}","languages_url":"https://api.github.com/repos/barambani/laserdisc/languages","stargazers_url":"https://api.github.com/repos/barambani/laserdisc/stargazers","contributors_url":"https://api.github.com/repos/barambani/laserdisc/contributors","subscribers_url":"https://api.github.com/repos/barambani/laserdisc/subscribers","subscription_url":"https://api.github.com/repos/barambani/laserdisc/subscription","commits_url":"https://api.github.com/repos/barambani/laserdisc/commits{/sha}","git_commits_url":"https://api.github.com/repos/barambani/laserdisc/git/commits{/sha}","comments_url":"https://api.github.com/repos/barambani/laserdisc/comments{/number}","issue_comment_url":"https://api.github.com/repos/barambani/laserdisc/issues/comments{/number}","contents_url":"https://api.github.com/repos/barambani/laserdisc/contents/{+path}","compare_url":"https://api.github.com/repos/barambani/laserdisc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/barambani/laserdisc/merges","archive_url":"https://api.github.com/repos/barambani/laserdisc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/barambani/laserdisc/downloads","issues_url":"https://api.github.com/repos/barambani/laserdisc/issues{/number}","pulls_url":"https://api.github.com/repos/barambani/laserdisc/pulls{/number}","milestones_url":"https://api.github.com/repos/barambani/laserdisc/milestones{/number}","notifications_url":"https://api.github.com/repos/barambani/laserdisc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/barambani/laserdisc/labels{/name}","releases_url":"https://api.github.com/repos/barambani/laserdisc/releases{/id}","deployments_url":"https://api.github.com/repos/barambani/laserdisc/deployments","created_at":"2018-06-21T15:09:29Z","updated_at":"2018-07-23T13:01:53Z","pushed_at":"2018-08-01T16:04:38Z","git_url":"git://github.com/barambani/laserdisc.git","ssh_url":"git@github.com:barambani/laserdisc.git","clone_url":"https://github.com/barambani/laserdisc.git","svn_url":"https://github.com/barambani/laserdisc","homepage":null,"size":137,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"laserdisc-io:master","ref":"master","sha":"55e92895826c9781695fe14a050cc8dcd62b5b17","user":{"login":"laserdisc-io","id":39946901,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5OTQ2OTAx","avatar_url":"https://avatars3.githubusercontent.com/u/39946901?v=4","gravatar_id":"","url":"https://api.github.com/users/laserdisc-io","html_url":"https://github.com/laserdisc-io","followers_url":"https://api.github.com/users/laserdisc-io/followers","following_url":"https://api.github.com/users/laserdisc-io/following{/other_user}","gists_url":"https://api.github.com/users/laserdisc-io/gists{/gist_id}","starred_url":"https://api.github.com/users/laserdisc-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laserdisc-io/subscriptions","organizations_url":"https://api.github.com/users/laserdisc-io/orgs","repos_url":"https://api.github.com/users/laserdisc-io/repos","events_url":"https://api.github.com/users/laserdisc-io/events{/privacy}","received_events_url":"https://api.github.com/users/laserdisc-io/received_events","type":"Organization","site_admin":false},"repo":{"id":136150585,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYxNTA1ODU=","name":"laserdisc","full_name":"laserdisc-io/laserdisc","owner":{"login":"laserdisc-io","id":39946901,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5OTQ2OTAx","avatar_url":"https://avatars3.githubusercontent.com/u/39946901?v=4","gravatar_id":"","url":"https://api.github.com/users/laserdisc-io","html_url":"https://github.com/laserdisc-io","followers_url":"https://api.github.com/users/laserdisc-io/followers","following_url":"https://api.github.com/users/laserdisc-io/following{/other_user}","gists_url":"https://api.github.com/users/laserdisc-io/gists{/gist_id}","starred_url":"https://api.github.com/users/laserdisc-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laserdisc-io/subscriptions","organizations_url":"https://api.github.com/users/laserdisc-io/orgs","repos_url":"https://api.github.com/users/laserdisc-io/repos","events_url":"https://api.github.com/users/laserdisc-io/events{/privacy}","received_events_url":"https://api.github.com/users/laserdisc-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/laserdisc-io/laserdisc","description":"A(nother) Redis Client","fork":false,"url":"https://api.github.com/repos/laserdisc-io/laserdisc","forks_url":"https://api.github.com/repos/laserdisc-io/laserdisc/forks","keys_url":"https://api.github.com/repos/laserdisc-io/laserdisc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/laserdisc-io/laserdisc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/laserdisc-io/laserdisc/teams","hooks_url":"https://api.github.com/repos/laserdisc-io/laserdisc/hooks","issue_events_url":"https://api.github.com/repos/laserdisc-io/laserdisc/issues/events{/number}","events_url":"https://api.github.com/repos/laserdisc-io/laserdisc/events","assignees_url":"https://api.github.com/repos/laserdisc-io/laserdisc/assignees{/user}","branches_url":"https://api.github.com/repos/laserdisc-io/laserdisc/branches{/branch}","tags_url":"https://api.github.com/repos/laserdisc-io/laserdisc/tags","blobs_url":"https://api.github.com/repos/laserdisc-io/laserdisc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/laserdisc-io/laserdisc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/laserdisc-io/laserdisc/git/refs{/sha}","trees_url":"https://api.github.com/repos/laserdisc-io/laserdisc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/laserdisc-io/laserdisc/statuses/{sha}","languages_url":"https://api.github.com/repos/laserdisc-io/laserdisc/languages","stargazers_url":"https://api.github.com/repos/laserdisc-io/laserdisc/stargazers","contributors_url":"https://api.github.com/repos/laserdisc-io/laserdisc/contributors","subscribers_url":"https://api.github.com/repos/laserdisc-io/laserdisc/subscribers","subscription_url":"https://api.github.com/repos/laserdisc-io/laserdisc/subscription","commits_url":"https://api.github.com/repos/laserdisc-io/laserdisc/commits{/sha}","git_commits_url":"https://api.github.com/repos/laserdisc-io/laserdisc/git/commits{/sha}","comments_url":"https://api.github.com/repos/laserdisc-io/laserdisc/comments{/number}","issue_comment_url":"https://api.github.com/repos/laserdisc-io/laserdisc/issues/comments{/number}","contents_url":"https://api.github.com/repos/laserdisc-io/laserdisc/contents/{+path}","compare_url":"https://api.github.com/repos/laserdisc-io/laserdisc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/laserdisc-io/laserdisc/merges","archive_url":"https://api.github.com/repos/laserdisc-io/laserdisc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/laserdisc-io/laserdisc/downloads","issues_url":"https://api.github.com/repos/laserdisc-io/laserdisc/issues{/number}","pulls_url":"https://api.github.com/repos/laserdisc-io/laserdisc/pulls{/number}","milestones_url":"https://api.github.com/repos/laserdisc-io/laserdisc/milestones{/number}","notifications_url":"https://api.github.com/repos/laserdisc-io/laserdisc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/laserdisc-io/laserdisc/labels{/name}","releases_url":"https://api.github.com/repos/laserdisc-io/laserdisc/releases{/id}","deployments_url":"https://api.github.com/repos/laserdisc-io/laserdisc/deployments","created_at":"2018-06-05T09:07:12Z","updated_at":"2018-07-29T18:42:12Z","pushed_at":"2018-08-01T16:04:39Z","git_url":"git://github.com/laserdisc-io/laserdisc.git","ssh_url":"git@github.com:laserdisc-io/laserdisc.git","clone_url":"https://github.com/laserdisc-io/laserdisc.git","svn_url":"https://github.com/laserdisc-io/laserdisc","homepage":null,"size":118,"stargazers_count":15,"watchers_count":15,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":4,"open_issues":2,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/laserdisc-io/laserdisc/pulls/13"},"html":{"href":"https://github.com/laserdisc-io/laserdisc/pull/13"},"issue":{"href":"https://api.github.com/repos/laserdisc-io/laserdisc/issues/13"},"comments":{"href":"https://api.github.com/repos/laserdisc-io/laserdisc/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/laserdisc-io/laserdisc/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/laserdisc-io/laserdisc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/laserdisc-io/laserdisc/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/laserdisc-io/laserdisc/statuses/f082b709181b78eaefb5afe24ab82b80c0d5ffd4"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"barambani"}}