Closed vito-c closed 6 years ago
Here is some test data. Github wouldn't let me upload the file so I just pasted the json.
```
[
{
"url": "https://api.github.com/repos/stedolan/jq/issues/1033",
"labels_url": "https://api.github.com/repos/stedolan/jq/issues/1033/labels{/name}",
"comments_url": "https://api.github.com/repos/stedolan/jq/issues/1033/comments",
"events_url": "https://api.github.com/repos/stedolan/jq/issues/1033/events",
"html_url": "https://github.com/stedolan/jq/issues/1033",
"id": 120139524,
"number": 1033,
"title": "jq hangs with 100% CPU",
"user": {
"login": "yurivict",
"id": 271906,
"avatar_url": "https://avatars.githubusercontent.com/u/271906?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/yurivict",
"html_url": "https://github.com/yurivict",
"followers_url": "https://api.github.com/users/yurivict/followers",
"following_url": "https://api.github.com/users/yurivict/following{/other_user}",
"gists_url": "https://api.github.com/users/yurivict/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yurivict/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yurivict/subscriptions",
"organizations_url": "https://api.github.com/users/yurivict/orgs",
"repos_url": "https://api.github.com/users/yurivict/repos",
"events_url": "https://api.github.com/users/yurivict/events{/privacy}",
"received_events_url": "https://api.github.com/users/yurivict/received_events",
"type": "User",
"site_admin": false
},
"labels": [
{
"url": "https://api.github.com/repos/stedolan/jq/labels/bug",
"name": "bug",
"color": "e11d21"
}
],
"state": "open",
"locked": false,
"assignee": {
"login": "nicowilliams",
"id": 604851,
"avatar_url": "https://avatars.githubusercontent.com/u/604851?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/nicowilliams",
"html_url": "https://github.com/nicowilliams",
"followers_url": "https://api.github.com/users/nicowilliams/followers",
"following_url": "https://api.github.com/users/nicowilliams/following{/other_user}",
"gists_url": "https://api.github.com/users/nicowilliams/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nicowilliams/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nicowilliams/subscriptions",
"organizations_url": "https://api.github.com/users/nicowilliams/orgs",
"repos_url": "https://api.github.com/users/nicowilliams/repos",
"events_url": "https://api.github.com/users/nicowilliams/events{/privacy}",
"received_events_url": "https://api.github.com/users/nicowilliams/received_events",
"type": "User",
"site_admin": false
},
"milestone": null,
"comments": 9,
"created_at": "2015-12-03T10:32:05Z",
"updated_at": "2015-12-04T02:26:01Z",
"closed_at": null,
"body": "This script hangs\r\n```\r\n#!/bin/sh\r\n\r\njq -s '((.[0][\"packageDependencies\"] | with_entries({key:(.key), value:(.value|gsub(\"(.*)\";\"\\\\1\"; \"x\"))})) | {packageDependencies:.})' package1.json\r\n```\r\nwhen run on this package1.json\r\n```\r\n{\r\n \"packageDependencies\": {\r\n \"language-yaml\": \"0.24.1\"\r\n }\r\n}\r\n```\r\n\r\nSince jq is supposed to work in a stream fashion, I don't think it should ever enter the endless cycle.\r\n\r\njq-1.5 on FreeBSD-10.2"
},
{
"url": "https://api.github.com/repos/stedolan/jq/issues/1032",
"labels_url": "https://api.github.com/repos/stedolan/jq/issues/1032/labels{/name}",
"comments_url": "https://api.github.com/repos/stedolan/jq/issues/1032/comments",
"events_url": "https://api.github.com/repos/stedolan/jq/issues/1032/events",
"html_url": "https://github.com/stedolan/jq/pull/1032",
"id": 119871577,
"number": 1032,
"title": "Dump block",
"user": {
"login": "nicowilliams",
"id": 604851,
"avatar_url": "https://avatars.githubusercontent.com/u/604851?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/nicowilliams",
"html_url": "https://github.com/nicowilliams",
"followers_url": "https://api.github.com/users/nicowilliams/followers",
"following_url": "https://api.github.com/users/nicowilliams/following{/other_user}",
"gists_url": "https://api.github.com/users/nicowilliams/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nicowilliams/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nicowilliams/subscriptions",
"organizations_url": "https://api.github.com/users/nicowilliams/orgs",
"repos_url": "https://api.github.com/users/nicowilliams/repos",
"events_url": "https://api.github.com/users/nicowilliams/events{/privacy}",
"received_events_url": "https://api.github.com/users/nicowilliams/received_events",
"type": "User",
"site_admin": false
},
"labels": [
],
"state": "open",
"locked": false,
"assignee": null,
"milestone": null,
"comments": 10,
"created_at": "2015-12-02T05:41:47Z",
"updated_at": "2015-12-03T15:45:33Z",
"closed_at": null,
"pull_request": {
"url": "https://api.github.com/repos/stedolan/jq/pulls/1032",
"html_url": "https://github.com/stedolan/jq/pull/1032",
"diff_url": "https://github.com/stedolan/jq/pull/1032.diff",
"patch_url": "https://github.com/stedolan/jq/pull/1032.patch"
},
"body": "This is a work in progress. We'll need a new jq compile function to take the dump_block option. Or we could overload the existing `jq_compile_args()` `args` argument to accept special arguments (ones whose names are not valid identifiers). I vote for a new function. Comments?"
},
{
"url": "https://api.github.com/repos/stedolan/jq/issues/1027",
"labels_url": "https://api.github.com/repos/stedolan/jq/issues/1027/labels{/name}",
"comments_url": "https://api.github.com/repos/stedolan/jq/issues/1027/comments",
"events_url": "https://api.github.com/repos/stedolan/jq/issues/1027/events",
"html_url": "https://github.com/stedolan/jq/issues/1027",
"id": 119359020,
"number": 1027,
"title": "Error messages should contain column numbers",
"user": {
"login": "yurivict",
"id": 271906,
"avatar_url": "https://avatars.githubusercontent.com/u/271906?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/yurivict",
"html_url": "https://github.com/yurivict",
"followers_url": "https://api.github.com/users/yurivict/followers",
"following_url": "https://api.github.com/users/yurivict/following{/other_user}",
"gists_url": "https://api.github.com/users/yurivict/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yurivict/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yurivict/subscriptions",
"organizations_url": "https://api.github.com/users/yurivict/orgs",
"repos_url": "https://api.github.com/users/yurivict/repos",
"events_url": "https://api.github.com/users/yurivict/events{/privacy}",
"received_events_url": "https://api.github.com/users/yurivict/received_events",
"type": "User",
"site_admin": false
},
"labels": [
{
"url": "https://api.github.com/repos/stedolan/jq/labels/feature%20request",
"name": "feature request",
"color": "207de5"
}
],
"state": "open",
"locked": false,
"assignee": null,
"milestone": null,
"comments": 0,
"created_at": "2015-11-29T12:48:49Z",
"updated_at": "2015-11-29T17:06:55Z",
"closed_at": null,
"body": "Message like this\r\n```\r\njq: error: syntax error, unexpected INVALID_CHARACTER (Unix shell quoting issues?) at \r\n========================================\r\n jq 1.5-1-a5b5cbe: ./test-suite.log\r\n========================================\r\n\r\n# TOTAL: 4\r\n# PASS: 0\r\n# SKIP: 0\r\n# XFAIL: 0\r\n# FAIL: 4\r\n# XPASS: 0\r\n# ERROR: 0\r\n\r\n.. contents:: :depth: 2\r\n\r\nFAIL: tests/mantest\r\n===================\r\n\r\nSegmentation fault\r\nrake aborted!\r\nErrno::EPIPE: Broken pipe @ io_write -
\r\n\r\nVersion 1.4 worked [just fine](https://buildd.debian.org/status/package.php?p=jq&suite=jessie). Any ideas?"
},
{
"url": "https://api.github.com/repos/stedolan/jq/issues/986",
"labels_url": "https://api.github.com/repos/stedolan/jq/issues/986/labels{/name}",
"comments_url": "https://api.github.com/repos/stedolan/jq/issues/986/comments",
"events_url": "https://api.github.com/repos/stedolan/jq/issues/986/events",
"html_url": "https://github.com/stedolan/jq/issues/986",
"id": 111039703,
"number": 986,
"title": "Anchors don't account for height of top nav bar",
"user": {
"login": "dtolnay",
"id": 1940490,
"avatar_url": "https://avatars.githubusercontent.com/u/1940490?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/dtolnay",
"html_url": "https://github.com/dtolnay",
"followers_url": "https://api.github.com/users/dtolnay/followers",
"following_url": "https://api.github.com/users/dtolnay/following{/other_user}",
"gists_url": "https://api.github.com/users/dtolnay/gists{/gist_id}",
"starred_url": "https://api.github.com/users/dtolnay/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dtolnay/subscriptions",
"organizations_url": "https://api.github.com/users/dtolnay/orgs",
"repos_url": "https://api.github.com/users/dtolnay/repos",
"events_url": "https://api.github.com/users/dtolnay/events{/privacy}",
"received_events_url": "https://api.github.com/users/dtolnay/received_events",
"type": "User",
"site_admin": false
},
"labels": [
{
"url": "https://api.github.com/repos/stedolan/jq/labels/site",
"name": "site",
"color": "5319e7"
}
],
"state": "open",
"locked": false,
"assignee": {
"login": "dtolnay",
"id": 1940490,
"avatar_url": "https://avatars.githubusercontent.com/u/1940490?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/dtolnay",
"html_url": "https://github.com/dtolnay",
"followers_url": "https://api.github.com/users/dtolnay/followers",
"following_url": "https://api.github.com/users/dtolnay/following{/other_user}",
"gists_url": "https://api.github.com/users/dtolnay/gists{/gist_id}",
"starred_url": "https://api.github.com/users/dtolnay/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dtolnay/subscriptions",
"organizations_url": "https://api.github.com/users/dtolnay/orgs",
"repos_url": "https://api.github.com/users/dtolnay/repos",
"events_url": "https://api.github.com/users/dtolnay/events{/privacy}",
"received_events_url": "https://api.github.com/users/dtolnay/received_events",
"type": "User",
"site_admin": false
},
"milestone": null,
"comments": 2,
"created_at": "2015-10-12T19:32:14Z",
"updated_at": "2015-10-14T06:34:16Z",
"closed_at": null,
"body": "When you visit (for example) https://stedolan.github.io/jq/manual/#Arrayconstruction-[], part of the header is hidden behind the top nav bar:\r\n\r\n![anchor](https://cloud.githubusercontent.com/assets/1940490/10436715/0464e950-70dd-11e5-8a84-36dad08ebda3.png)\r\n"
},
{
"url": "https://api.github.com/repos/stedolan/jq/issues/975",
"labels_url": "https://api.github.com/repos/stedolan/jq/issues/975/labels{/name}",
"comments_url": "https://api.github.com/repos/stedolan/jq/issues/975/comments",
"events_url": "https://api.github.com/repos/stedolan/jq/issues/975/events",
"html_url": "https://github.com/stedolan/jq/issues/975",
"id": 109667227,
"number": 975,
"title": "Proposal: innerjoin and friends",
"user": {
"login": "pkoppstein",
"id": 172847,
"avatar_url": "https://avatars.githubusercontent.com/u/172847?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/pkoppstein",
"html_url": "https://github.com/pkoppstein",
"followers_url": "https://api.github.com/users/pkoppstein/followers",
"following_url": "https://api.github.com/users/pkoppstein/following{/other_user}",
"gists_url": "https://api.github.com/users/pkoppstein/gists{/gist_id}",
"starred_url": "https://api.github.com/users/pkoppstein/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pkoppstein/subscriptions",
"organizations_url": "https://api.github.com/users/pkoppstein/orgs",
"repos_url": "https://api.github.com/users/pkoppstein/repos",
"events_url": "https://api.github.com/users/pkoppstein/events{/privacy}",
"received_events_url": "https://api.github.com/users/pkoppstein/received_events",
"type": "User",
"site_admin": false
},
"labels": [
{
"url": "https://api.github.com/repos/stedolan/jq/labels/contribution",
"name": "contribution",
"color": "d4c5f9"
},
{
"url": "https://api.github.com/repos/stedolan/jq/labels/feature%20request:%20jq%20function%20library",
"name": "feature request: jq function library",
"color": "207de5"
}
],
"state": "open",
"locked": false,
"assignee": null,
"milestone": null,
"comments": 2,
"created_at": "2015-10-04T07:01:28Z",
"updated_at": "2015-10-06T22:30:55Z",
"closed_at": null,
"body": "This proposal envisions the addition of four new builtin function names for the following five filters:\r\n```\r\nobjectify/1 -- create an object from an array of headers (interpreted as\r\n key names) and an array of values;\r\n\r\nquery/1 -- query one object using another as a \"query object\";\r\n\r\ncoalesce/1 -- combine an array of objects into a single object by \r\n coalescing values (at a specified key) into an array, e.g.:\r\n\t \r\n\t [{id:1, \"a\":1}, {id:1, \"a\":2}] | coalesce(\"a\")\r\n\t produces: {\"id\": 1, \"a\": [1,2]}\r\n\r\ncoalesce/2 -- given an array of objects, a query object to be used for\r\n grouping, and the name of a key to be used for coalescing,\r\n\t produce an array of coalesced objects, one per group.\r\n\r\ninnerjoin(r1; r2; queryobject) -- compute the JSON analog of the \"inner join\" of\r\n of r1 and r2, where these are the JSON analogs of two tables,\r\n\t and queryobject defines the join key.\r\n```\r\nNote: \"innerjoin/3\" and its implementation are experimental; in particular, it might be better to define innerjoin(queryobject) with the input being an array [r1, r2, ...].\r\n\r\nTo illustrate the power and utility of these filters, consider the following sequence of two tasks:\r\n\r\n(1) the transformation of a \"flat\" CSV or TSV file (or similar array of arrays) into a non-flat object-oriented structure;\r\n\r\n(2) the computation of an \"inner join\".\r\n\r\nSuppose we start with a CSV file containing the following data recording responses on a multiple-choice questionnaire:\r\n\r\nTable 1\r\n```\r\nid | question_id| respondent_id| value_response\r\n-------------------------------| --------------\r\n1 | 1 | 1 | SFU \r\n2 | 1 | 1 | UBC \r\n3 | 2 | 1 | BU \r\n4 | 2 | 1 | RI\r\n5 | 1 | 2 | ABC\r\n6 | 1 | 2 | DEF\r\n7 | 2 | 2 | BU \r\n8 | 2 | 2 | XYZ\r\n```\r\n\r\nThe first task is to transform this into a a JSON representation in which the responses for each respondent-question are available as a single array. That is, we want to produce an array of objects, each having the form:\r\n\r\n{ question_id: _, respondent_id: _, value_responses: [ ... ] }\r\n\r\nThe second task is to compute the JSON representation of the inner join of this relation with the following:\r\n\r\nTable 2\r\n```\r\nquestion_id | question_name\r\n---------------------------\r\n1 | Q1\r\n2 | Q2\r\n```\r\n\r\nAssuming we have read each of the flat files into an array of arrays in the obvious way, the first task can be accomplished as follows, using the proposed filters:\r\n\r\nFor the first table:\r\n```\r\n .[0] as $headers\r\n | .[1:] | map(objectify($headers));\r\n | map(del(.id))\r\n | coalesce( { \"question_id\": 0, \"respondent_id\": 0}; \"value_response\" )\r\n```\r\nIf this representation of the first table is defined as Table1 and if Table2 is the objectified representation of Table 2, then the innerjoin can be computed by:\r\n```\r\n innerjoin(Table1; Table2; {question_id: 0}).\r\n```\r\n### Implementation\r\n\r\nConverting a CSV file to a JSON array of arrays can most robustly be accomplished\r\nusing a tool such as any-json, so we won't dwell on that further.\r\n\r\nHere then are the proposed definitions of the new filters, with comments:\r\n```\r\ndef objectify(headers):\r\n . as $in\r\n | reduce range(0; headers|length) as $i ({}; .[headers[$i]] = $in[$i] );\r\n\r\ndef query(object):\r\n with_entries( select( .key as $key | object | has( $key ) ));\r\n\r\n# Given an array of objects with a key specified by \"key\", sum the\r\n# objects using + for all keys except \"key\", and coalescing the values at \"key\":\r\ndef coalesce( key ):\r\n reduce .[] as $o ({}; .[key] += [$o[key]] | . + ($o|delpaths([[key]]) ) );\r\n\r\n# Input: an array of objects\r\n# group: an object defining a grouping criterion\r\n# ckey: the key to coalesce (a string)\r\n# Output: an array of objects, one per group\r\ndef coalesce(group; ckey):\r\n group_by( query(group) )\r\n | map(coalesce(ckey)) ;\r\n\r\n\r\n# Assuming r1 and r2 are objectified representations of relational\r\n# tables, innerjoin(r1;r2;q) computes the objectifed representation of\r\n# their innerjoin, using q as the query object defining the join-key.\r\n@ (An example is given below.)\r\ndef innerjoin(r1; r2; queryobject):\r\n reduce r1[] as $row1 ([];\r\n (r2 | map(select( query(queryobject) == ($row1|query(queryobject)) ))) as $row2\r\n | . + ($row2 | map( $row1 + . )) );\r\n```\r\n\r\n#### Example of innerjoin/3\r\n\r\nGiven:\r\n```\r\ndef r1:\r\n [ {qid:1, qname: \"Q1\"}, {qid:2, qname: \"Q2\"}];\r\n\r\ndef r2:\r\n [ {student_id: \"A\", qid: 1},\r\n {student_id: \"A\", qid: 2},\r\n {student_id: \"B\", qid: 1},\r\n {student_id: \"B\", qid: 2}];\r\n``` \r\nthen `innerjoin( r1; r2; {qid:null})` produces:\r\n```\r\n[ {\"qid\":1,\"qname\":\"Q1\",\"student_id\":\"A\"},\r\n {\"qid\":1,\"qname\":\"Q1\",\"student_id\":\"B\"},\r\n {\"qid\":2,\"qname\":\"Q2\",\"student_id\":\"A\"},\r\n {\"qid\":2,\"qname\":\"Q2\",\"student_id\":\"B\"} ]\r\n```\r\n"
},
{
"url": "https://api.github.com/repos/stedolan/jq/issues/974",
"labels_url": "https://api.github.com/repos/stedolan/jq/issues/974/labels{/name}",
"comments_url": "https://api.github.com/repos/stedolan/jq/issues/974/comments",
"events_url": "https://api.github.com/repos/stedolan/jq/issues/974/events",
"html_url": "https://github.com/stedolan/jq/issues/974",
"id": 109662501,
"number": 974,
"title": "Enhancement request: specify flags in script file",
"user": {
"login": "markjreed",
"id": 361055,
"avatar_url": "https://avatars.githubusercontent.com/u/361055?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/markjreed",
"html_url": "https://github.com/markjreed",
"followers_url": "https://api.github.com/users/markjreed/followers",
"following_url": "https://api.github.com/users/markjreed/following{/other_user}",
"gists_url": "https://api.github.com/users/markjreed/gists{/gist_id}",
"starred_url": "https://api.github.com/users/markjreed/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/markjreed/subscriptions",
"organizations_url": "https://api.github.com/users/markjreed/orgs",
"repos_url": "https://api.github.com/users/markjreed/repos",
"events_url": "https://api.github.com/users/markjreed/events{/privacy}",
"received_events_url": "https://api.github.com/users/markjreed/received_events",
"type": "User",
"site_admin": false
},
"labels": [
{
"url": "https://api.github.com/repos/stedolan/jq/labels/feature%20request",
"name": "feature request",
"color": "207de5"
}
],
"state": "open",
"locked": false,
"assignee": null,
"milestone": null,
"comments": 9,
"created_at": "2015-10-04T04:25:02Z",
"updated_at": "2015-10-06T22:04:44Z",
"closed_at": null,
"body": "It would be useful if a script file (to be read via `jq -f`) had a way of specifying that it should be run with other command-line options. For example, it might be written to assume slurp mode, so it would be nice if it could indicate that somehow - perhaps similar to the way Perl will look for and honor flags in the shebang line even if not executed via exec(). \r\n\r\nOf course you could just make it a shell script, but then the jq file is not itself portable between windows and unix."
},
{
"url": "https://api.github.com/repos/stedolan/jq/issues/970",
"labels_url": "https://api.github.com/repos/stedolan/jq/issues/970/labels{/name}",
"comments_url": "https://api.github.com/repos/stedolan/jq/issues/970/comments",
"events_url": "https://api.github.com/repos/stedolan/jq/issues/970/events",
"html_url": "https://github.com/stedolan/jq/issues/970",
"id": 109314154,
"number": 970,
"title": "map_values and select work together?",
"user": {
"login": "rikrd",
"id": 15324,
"avatar_url": "https://avatars.githubusercontent.com/u/15324?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/rikrd",
"html_url": "https://github.com/rikrd",
"followers_url": "https://api.github.com/users/rikrd/followers",
"following_url": "https://api.github.com/users/rikrd/following{/other_user}",
"gists_url": "https://api.github.com/users/rikrd/gists{/gist_id}",
"starred_url": "https://api.github.com/users/rikrd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rikrd/subscriptions",
"organizations_url": "https://api.github.com/users/rikrd/orgs",
"repos_url": "https://api.github.com/users/rikrd/repos",
"events_url": "https://api.github.com/users/rikrd/events{/privacy}",
"received_events_url": "https://api.github.com/users/rikrd/received_events",
"type": "User",
"site_admin": false
},
"labels": [
{
"url": "https://api.github.com/repos/stedolan/jq/labels/feature%20request",
"name": "feature request",
"color": "207de5"
},
{
"url": "https://api.github.com/repos/stedolan/jq/labels/support",
"name": "support",
"color": "bfe5bf"
}
],
"state": "open",
"locked": false,
"assignee": null,
"milestone": null,
"comments": 33,
"created_at": "2015-10-01T14:41:30Z",
"updated_at": "2015-10-04T06:22:51Z",
"closed_at": null,
"body": "Hi, shouldn't this work?\r\n\r\nhttps://jqplay.org/jq?q=.toto%20|%20map_values(select(.x==%22t%22))&j={%22toto%22:%20{%22a%22:%20{%22x%22:%20%22t%22},%20%22b%22:%20{%22x%22:%20%22t%22},%20%22c%22:%20{%22x%22:%20%22r%22}}}\r\n\r\nThe output I was expecting was:\r\n```json\r\n\"a\": {\"x\": \"t\"}, \"b\": {\"x\": \"t\"}\r\n```"
},
{
"url": "https://api.github.com/repos/stedolan/jq/issues/967",
"labels_url": "https://api.github.com/repos/stedolan/jq/issues/967/labels{/name}",
"comments_url": "https://api.github.com/repos/stedolan/jq/issues/967/comments",
"events_url": "https://api.github.com/repos/stedolan/jq/issues/967/events",
"html_url": "https://github.com/stedolan/jq/issues/967",
"id": 108746628,
"number": 967,
"title": "Document delpaths",
"user": {
"login": "nicowilliams",
"id": 604851,
"avatar_url": "https://avatars.githubusercontent.com/u/604851?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/nicowilliams",
"html_url": "https://github.com/nicowilliams",
"followers_url": "https://api.github.com/users/nicowilliams/followers",
"following_url": "https://api.github.com/users/nicowilliams/following{/other_user}",
"gists_url": "https://api.github.com/users/nicowilliams/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nicowilliams/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nicowilliams/subscriptions",
"organizations_url": "https://api.github.com/users/nicowilliams/orgs",
"repos_url": "https://api.github.com/users/nicowilliams/repos",
"events_url": "https://api.github.com/users/nicowilliams/events{/privacy}",
"received_events_url": "https://api.github.com/users/nicowilliams/received_events",
"type": "User",
"site_admin": false
},
"labels": [
{
"url": "https://api.github.com/repos/stedolan/jq/labels/docs",
"name": "docs",
"color": "5319e7"
}
],
"state": "open",
"locked": false,
"assignee": {
"login": "nicowilliams",
"id": 604851,
"avatar_url": "https://avatars.githubusercontent.com/u/604851?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/nicowilliams",
"html_url": "https://github.com/nicowilliams",
"followers_url": "https://api.github.com/users/nicowilliams/followers",
"following_url": "https://api.github.com/users/nicowilliams/following{/other_user}",
"gists_url": "https://api.github.com/users/nicowilliams/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nicowilliams/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nicowilliams/subscriptions",
"organizations_url": "https://api.github.com/users/nicowilliams/orgs",
"repos_url": "https://api.github.com/users/nicowilliams/repos",
"events_url": "https://api.github.com/users/nicowilliams/events{/privacy}",
"received_events_url": "https://api.github.com/users/nicowilliams/received_events",
"type": "User",
"site_admin": false
},
"milestone": null,
"comments": 0,
"created_at": "2015-09-28T21:05:29Z",
"updated_at": "2015-09-28T21:05:29Z",
"closed_at": null,
"body": ""
},
{
"url": "https://api.github.com/repos/stedolan/jq/issues/965",
"labels_url": "https://api.github.com/repos/stedolan/jq/issues/965/labels{/name}",
"comments_url": "https://api.github.com/repos/stedolan/jq/issues/965/comments",
"events_url": "https://api.github.com/repos/stedolan/jq/issues/965/events",
"html_url": "https://github.com/stedolan/jq/issues/965",
"id": 108717290,
"number": 965,
"title": "Allow setting raw input delimiter",
"user": {
"login": "phiresky",
"id": 2303841,
"avatar_url": "https://avatars.githubusercontent.com/u/2303841?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/phiresky",
"html_url": "https://github.com/phiresky",
"followers_url": "https://api.github.com/users/phiresky/followers",
"following_url": "https://api.github.com/users/phiresky/following{/other_user}",
"gists_url": "https://api.github.com/users/phiresky/gists{/gist_id}",
"starred_url": "https://api.github.com/users/phiresky/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phiresky/subscriptions",
"organizations_url": "https://api.github.com/users/phiresky/orgs",
"repos_url": "https://api.github.com/users/phiresky/repos",
"events_url": "https://api.github.com/users/phiresky/events{/privacy}",
"received_events_url": "https://api.github.com/users/phiresky/received_events",
"type": "User",
"site_admin": false
},
"labels": [
{
"url": "https://api.github.com/repos/stedolan/jq/labels/feature%20request",
"name": "feature request",
"color": "207de5"
}
],
"state": "open",
"locked": false,
"assignee": null,
"milestone": null,
"comments": 5,
"created_at": "2015-09-28T18:18:31Z",
"updated_at": "2015-09-28T19:56:55Z",
"closed_at": null,
"body": "As far as I can tell, this is not currently possible?\r\n\r\nmain use case:\r\n`find | jq -R` works\r\n\r\nbut because filenames can contain newlines that is not safe, so I'd like to use `find -print0`, but jq does not allow setting \\0 as the input delimiter (or setting it at all).\r\n\r\nIt can be circumvented with\r\n```bash\r\nfind -print0|jq --slurp --raw-input 'split(\"\\u0000\")[]'\r\n```\r\n\r\nbut that disables streaming the input\r\n\r\n\r\nUsage in other programs (for \\0):\r\n\r\n* `xargs -0` or `xargs --null`\r\n* `sed -z` or `sed --null-data`"
},
{
"url": "https://api.github.com/repos/stedolan/jq/issues/957",
"labels_url": "https://api.github.com/repos/stedolan/jq/issues/957/labels{/name}",
"comments_url": "https://api.github.com/repos/stedolan/jq/issues/957/comments",
"events_url": "https://api.github.com/repos/stedolan/jq/issues/957/events",
"html_url": "https://github.com/stedolan/jq/issues/957",
"id": 107581836,
"number": 957,
"title": "Array-capable merge",
"user": {
"login": "rektide",
"id": 53243,
"avatar_url": "https://avatars.githubusercontent.com/u/53243?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/rektide",
"html_url": "https://github.com/rektide",
"followers_url": "https://api.github.com/users/rektide/followers",
"following_url": "https://api.github.com/users/rektide/following{/other_user}",
"gists_url": "https://api.github.com/users/rektide/gists{/gist_id}",
"starred_url": "https://api.github.com/users/rektide/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rektide/subscriptions",
"organizations_url": "https://api.github.com/users/rektide/orgs",
"repos_url": "https://api.github.com/users/rektide/repos",
"events_url": "https://api.github.com/users/rektide/events{/privacy}",
"received_events_url": "https://api.github.com/users/rektide/received_events",
"type": "User",
"site_admin": false
},
"labels": [
{
"url": "https://api.github.com/repos/stedolan/jq/labels/feature%20request:%20jq%20function%20library",
"name": "feature request: jq function library",
"color": "207de5"
},
{
"url": "https://api.github.com/repos/stedolan/jq/labels/support",
"name": "support",
"color": "bfe5bf"
}
],
"state": "open",
"locked": false,
"assignee": null,
"milestone": null,
"comments": 4,
"created_at": "2015-09-21T19:28:02Z",
"updated_at": "2015-09-29T04:46:42Z",
"closed_at": null,
"body": "Current merge behavior when encountering two arrays in the same slot is to blow away the current array with the previous array.\r\n\r\n```\r\njq -s '.[0] += .[1] | .[0]' <(echo '{\"a\": 1, \"array\": [1,2,3]}') <(echo '{\"b\": 10, \"array\": [11,12,13]}')\r\n{\r\n \"a\": 1,\r\n \"array\": [\r\n 11,12,13\r\n ],\r\n \"b\": 10\r\n}\r\n```\r\n\r\nTo work around, I frequently use some temporary space to store the specific, about to be stomped array, and then I re-concat it in again latter. For example below, .[2] is that temporary store-\r\n\r\n```\r\njq -s '.[2] = .[0].array | .[0] += .[1] | .[0].array = .[2] + .[0].array | .[0]' <(echo '{\"a\": 1, \"array\": [1,2,3]}') <(echo '{\"b\": 10, \"array\": [11,12,13]}')\r\n{\r\n \"a\": 1,\r\n \"array\": [\r\n 1,2,3,11,12,13\r\n ],\r\n \"b\": 10\r\n} \r\n```\r\n\r\nThis practice keeps cropping up in more and more jq code that I touch.\r\n\r\nI would *love* an array capable merge, that can automatically concat two arrays in the same structural spot together. The current concat should almost certainly be preserved as is (to avoid breakage, whatnot)- I'm not sure what to propose for implementation, but I'd tend towards introducing a new, similar operator. I dont think _ has any interesting uses atm? :/"
},
{
"url": "https://api.github.com/repos/stedolan/jq/issues/929",
"labels_url": "https://api.github.com/repos/stedolan/jq/issues/929/labels{/name}",
"comments_url": "https://api.github.com/repos/stedolan/jq/issues/929/comments",
"events_url": "https://api.github.com/repos/stedolan/jq/issues/929/events",
"html_url": "https://github.com/stedolan/jq/issues/929",
"id": 103270993,
"number": 929,
"title": "OS X \"strptime\" results inconsistent with Linux",
"user": {
"login": "vielmetti",
"id": 35047,
"avatar_url": "https://avatars.githubusercontent.com/u/35047?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/vielmetti",
"html_url": "https://github.com/vielmetti",
"followers_url": "https://api.github.com/users/vielmetti/followers",
"following_url": "https://api.github.com/users/vielmetti/following{/other_user}",
"gists_url": "https://api.github.com/users/vielmetti/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vielmetti/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vielmetti/subscriptions",
"organizations_url": "https://api.github.com/users/vielmetti/orgs",
"repos_url": "https://api.github.com/users/vielmetti/repos",
"events_url": "https://api.github.com/users/vielmetti/events{/privacy}",
"received_events_url": "https://api.github.com/users/vielmetti/received_events",
"type": "User",
"site_admin": false
},
"labels": [
{
"url": "https://api.github.com/repos/stedolan/jq/labels/bug",
"name": "bug",
"color": "e11d21"
},
{
"url": "https://api.github.com/repos/stedolan/jq/labels/portability",
"name": "portability",
"color": "006b75"
}
],
"state": "open",
"locked": false,
"assignee": null,
"milestone": null,
"comments": 2,
"created_at": "2015-08-26T13:32:14Z",
"updated_at": "2015-08-31T18:22:09Z",
"closed_at": null,
"body": "The task I'm trying to accomplish is to pull in data from a data source that has timestamps but that doesn't specify time zone or daylight savings time. Ideally I'll get an accurate \"seconds since the epoch\" when I'm done parsing.\r\n\r\nThe problem is that I get different results depending on whether I'm on OS X Mavericks or on Linux Ubuntu. Here's a small sample script; I'm in EDT:\r\n\r\n```shell\r\ndate | sed -e 's/^/\\\"/' -e 's/$/\\\"/' | ./jq '(strptime(\"%a %b %d %H:%M:%S %Z %Y\")|mktime) - now'\r\n```\r\n\r\n(feed the output of the date command into jq as a string, parse the time, subtract current time, result in seconds).\r\n\r\nOn OS X I typically get output like -14400.879971027374 which corresponds to 4 hours off.\r\n\r\nOn Ubuntu I get output like -0.6590850353240967 which is less than a second off.\r\n\r\nIf I had to guess, there's something to do with this in the OS X docs:\r\n\r\n```\r\n The %Z format specifier only accepts time zone abbreviations of the local\r\n time zone, or the value \"GMT\". This limitation is because of ambiguity\r\n due to of the over loading of time zone abbreviations. One such example\r\n is EST which is both Eastern Standard Time and Eastern Australia Summer\r\n Time.\r\n\r\n```\r\n\r\nbut not in the Ubuntu docs, which reference glibc:\r\n\r\n```\r\n %Z The timezone name.\r\n```"
},
{
"url": "https://api.github.com/repos/stedolan/jq/issues/925",
"labels_url": "https://api.github.com/repos/stedolan/jq/issues/925/labels{/name}",
"comments_url": "https://api.github.com/repos/stedolan/jq/issues/925/comments",
"events_url": "https://api.github.com/repos/stedolan/jq/issues/925/events",
"html_url": "https://github.com/stedolan/jq/issues/925",
"id": 102700027,
"number": 925,
"title": "I/O primitives, take N",
"user": {
"login": "nicowilliams",
"id": 604851,
"avatar_url": "https://avatars.githubusercontent.com/u/604851?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/nicowilliams",
"html_url": "https://github.com/nicowilliams",
"followers_url": "https://api.github.com/users/nicowilliams/followers",
"following_url": "https://api.github.com/users/nicowilliams/following{/other_user}",
"gists_url": "https://api.github.com/users/nicowilliams/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nicowilliams/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nicowilliams/subscriptions",
"organizations_url": "https://api.github.com/users/nicowilliams/orgs",
"repos_url": "https://api.github.com/users/nicowilliams/repos",
"events_url": "https://api.github.com/users/nicowilliams/events{/privacy}",
"received_events_url": "https://api.github.com/users/nicowilliams/received_events",
"type": "User",
"site_admin": false
},
"labels": [
{
"url": "https://api.github.com/repos/stedolan/jq/labels/feature%20request",
"name": "feature request",
"color": "207de5"
}
],
"state": "open",
"locked": false,
"assignee": null,
"milestone": {
"url": "https://api.github.com/repos/stedolan/jq/milestones/8",
"html_url": "https://github.com/stedolan/jq/milestones/Maybe%20someday%20(wishlist)",
"labels_url": "https://api.github.com/repos/stedolan/jq/milestones/8/labels",
"id": 975948,
"number": 8,
"title": "Maybe someday (wishlist)",
"description": "",
"creator": {
"login": "nicowilliams",
"id": 604851,
"avatar_url": "https://avatars.githubusercontent.com/u/604851?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/nicowilliams",
"html_url": "https://github.com/nicowilliams",
"followers_url": "https://api.github.com/users/nicowilliams/followers",
"following_url": "https://api.github.com/users/nicowilliams/following{/other_user}",
"gists_url": "https://api.github.com/users/nicowilliams/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nicowilliams/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nicowilliams/subscriptions",
"organizations_url": "https://api.github.com/users/nicowilliams/orgs",
"repos_url": "https://api.github.com/users/nicowilliams/repos",
"events_url": "https://api.github.com/users/nicowilliams/events{/privacy}",
"received_events_url": "https://api.github.com/users/nicowilliams/received_events",
"type": "User",
"site_admin": false
},
"open_issues": 3,
"closed_issues": 0,
"state": "open",
"created_at": "2015-02-11T21:32:17Z",
"updated_at": "2015-09-11T16:56:01Z",
"due_on": null,
"closed_at": null
},
"comments": 0,
"created_at": "2015-08-24T04:01:47Z",
"updated_at": "2015-10-28T02:47:08Z",
"closed_at": null,
"body": "New plan for better I/O.\r\n\r\nFirst, finish the C-coded generators branch. C-coded generators are like C-coded functions, but take a `void **state` argument in which to keep state, return an invalid jv to denote backtracking, and get called with invalid inputs to denote resumption (i.e., the expression that gets the generator's output backtracked). During backtracking due to errors or cleanup any suspended C-coded generators get to cleanup state, and even catch errors -- this is important as we'll see below.\r\n\r\nSecond, manage privilege as follows:\r\n\r\n - low-level I/O C-coded builtins are only provided to bind unbound references in mid-/high-level I/O builtins and not to any others nor user-coded jq programs;\r\n - two sets of mid-/high-level I/O builtins: one that does real I/O, and one set of stubs that raise errors;\r\n - by default user-coded jq programs and modules get the stub I/O builtins;\r\n - a single new CLI option for indicating which module(s) (or even the top-level program) get the real I/O builtins;\r\n - modules allowed privileges can also grant them to others via the `import`/`include` directives (e.g., `import \"foo\" {privileged: true};`).\r\n\r\nThis means that users can create modules that perform access controls for sandboxing jq programs' I/O. They can express all authorization as jq code, or they can jq-code a module that allows expressing authorization via JSON files, allowing incantations like this: `jq --arg ACL acl.json --privilege wrappers/json_acl 'include \"wrappers/json_acl\"; readfile'` -> read files named on `stdin` wherever the given ACL file permits it.\r\n\r\nBecause we'd be encouraging the creation of wrapper modules, we might want to have an option for implicitly injecting `include`s of wrapper modules into top-level programs, so the previous example becomes `jq --arg ACL acl.json --privilege wrappers/json_acl --include wrappers/json_acl readfile` or maybe `jq --arg ACL acl.json --include-privileged wappers/json_acl readfile`.\r\n\r\nThird, create low-level C-coded generators for opening files/commands, and which output \"file handles\" (which will be plain jv values, of course), and C-coded read/write functions. These will never be available to users; only mid-/high-level builtin functions will have these, and the mid-/high-level builtins will never leak file handles or allow user programs to provide file handles that could get passed to the low-level I/O builtins. This, and the state management that C-coded generators get to do, means that we can *safely* actually encode things like `FILE *` values as jv values.\r\n\r\nThis plan works for file I/O and popen.\r\n\r\nFor other things, like co-routines, we may need a better notion of file descriptor-like handles, but that can be left out of scope for now even, though co-routines are appealing. (Icon, like jq has no closures of indefinite extent. Icon uses co-expressions to get around that limitation, with co-expressions holding on to copies of lexically visible bindings at co-expression instantiation time. Something similar for jq would be very nice indeed. Co-routines are a very nice balance of trade-offs compared to `call/cc` and a reasonable trade-off for lacking indefinite-extent closures (and as the latter can be used together with CPS conversion to construct `call/cc`, I repeat myself). jq needs a co-eval as well, so as to make it possible to jq-code a REPL that doesn't have to spawn jq.)\r\n\r\nBottom-line: jq programs would remain by-default sandboxed to filtering inputs to outputs, and jq would remain a DSL, but I/O with a decent privilege management model would begin to make jq a more general-purpose language.\r\n\r\nIt is worth noting that jq is a functional language, and that while adding builtins with non-deterministic behavior by and large does not change that, it does mean that the compiler has to know that such builtins are non-deterministic if we ever get to generalize constant-folding, or attempt better common sub-expression elimination, or other optimizations. We've already crossed the non-determinism Rubicon with the `input` and `inputs` builtins, and in practice jq programs are small enough that constant-folding and CSE is something that the user can be expected to do themselves if it really matters, so we might never care that much (users can constant-fold arithmetic, but not array/object construction, so it pays to have that).\r\n\r\nEDIT: Fix typo."
},
{
"url": "https://api.github.com/repos/stedolan/jq/issues/913",
"labels_url": "https://api.github.com/repos/stedolan/jq/issues/913/labels{/name}",
"comments_url": "https://api.github.com/repos/stedolan/jq/issues/913/comments",
"events_url": "https://api.github.com/repos/stedolan/jq/issues/913/events",
"html_url": "https://github.com/stedolan/jq/issues/913",
"id": 101238187,
"number": 913,
"title": "Build Solaris executables for 1.5",
"user": {
"login": "nicowilliams",
"id": 604851,
"avatar_url": "https://avatars.githubusercontent.com/u/604851?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/nicowilliams",
"html_url": "https://github.com/nicowilliams",
"followers_url": "https://api.github.com/users/nicowilliams/followers",
"following_url": "https://api.github.com/users/nicowilliams/following{/other_user}",
"gists_url": "https://api.github.com/users/nicowilliams/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nicowilliams/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nicowilliams/subscriptions",
"organizations_url": "https://api.github.com/users/nicowilliams/orgs",
"repos_url": "https://api.github.com/users/nicowilliams/repos",
"events_url": "https://api.github.com/users/nicowilliams/events{/privacy}",
"received_events_url": "https://api.github.com/users/nicowilliams/received_events",
"type": "User",
"site_admin": false
},
"labels": [
{
"url": "https://api.github.com/repos/stedolan/jq/labels/release/packaging",
"name": "release/packaging",
"color": "fbca04"
}
],
"state": "open",
"locked": false,
"assignee": {
"login": "nicowilliams",
"id": 604851,
"avatar_url": "https://avatars.githubusercontent.com/u/604851?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/nicowilliams",
"html_url": "https://github.com/nicowilliams",
"followers_url": "https://api.github.com/users/nicowilliams/followers",
"following_url": "https://api.github.com/users/nicowilliams/following{/other_user}",
"gists_url": "https://api.github.com/users/nicowilliams/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nicowilliams/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nicowilliams/subscriptions",
"organizations_url": "https://api.github.com/users/nicowilliams/orgs",
"repos_url": "https://api.github.com/users/nicowilliams/repos",
"events_url": "https://api.github.com/users/nicowilliams/events{/privacy}",
"received_events_url": "https://api.github.com/users/nicowilliams/received_events",
"type": "User",
"site_admin": false
},
"milestone": {
"url": "https://api.github.com/repos/stedolan/jq/milestones/3",
"html_url": "https://github.com/stedolan/jq/milestones/1.5%20release",
"labels_url": "https://api.github.com/repos/stedolan/jq/milestones/3/labels",
"id": 682789,
"number": 3,
"title": "1.5 release",
"description": "jq 1.5 should get all the features that won't be going into 1.4:\r\n\r\n - loadable modules\r\n - better jq library support\r\n - regexp/glob support\r\n - I/O primitives\r\n - generator primitives: `while`,\r\n - generator utils: `foreach`, `limit`\r\n - `try EXP catch EXP` (exceptions)\r\n - bignum support\r\n - anything else?",
"creator": {
"login": "nicowilliams",
"id": 604851,
"avatar_url": "https://avatars.githubusercontent.com/u/604851?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/nicowilliams",
"html_url": "https://github.com/nicowilliams",
"followers_url": "https://api.github.com/users/nicowilliams/followers",
"following_url": "https://api.github.com/users/nicowilliams/following{/other_user}",
"gists_url": "https://api.github.com/users/nicowilliams/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nicowilliams/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nicowilliams/subscriptions",
"organizations_url": "https://api.github.com/users/nicowilliams/orgs",
"repos_url": "https://api.github.com/users/nicowilliams/repos",
"events_url": "https://api.github.com/users/nicowilliams/events{/privacy}",
"received_events_url": "https://api.github.com/users/nicowilliams/received_events",
"type": "User",
"site_admin": false
},
"open_issues": 1,
"closed_issues": 128,
"state": "closed",
"created_at": "2014-06-05T23:19:44Z",
"updated_at": "2015-09-11T16:43:59Z",
"due_on": null,
"closed_at": "2015-08-16T06:59:34Z"
},
"comments": 2,
"created_at": "2015-08-16T06:46:34Z",
"updated_at": "2015-08-16T07:33:31Z",
"closed_at": null,
"body": ""
},
{
"url": "https://api.github.com/repos/stedolan/jq/issues/911",
"labels_url": "https://api.github.com/repos/stedolan/jq/issues/911/labels{/name}",
"comments_url": "https://api.github.com/repos/stedolan/jq/issues/911/comments",
"events_url": "https://api.github.com/repos/stedolan/jq/issues/911/events",
"html_url": "https://github.com/stedolan/jq/issues/911",
"id": 101234580,
"number": 911,
"title": "Win32 build is broken, needs to find PathIsRelativeA()",
"user": {
"login": "nicowilliams",
"id": 604851,
"avatar_url": "https://avatars.githubusercontent.com/u/604851?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/nicowilliams",
"html_url": "https://github.com/nicowilliams",
"followers_url": "https://api.github.com/users/nicowilliams/followers",
"following_url": "https://api.github.com/users/nicowilliams/following{/other_user}",
"gists_url": "https://api.github.com/users/nicowilliams/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nicowilliams/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nicowilliams/subscriptions",
"organizations_url": "https://api.github.com/users/nicowilliams/orgs",
"repos_url": "https://api.github.com/users/nicowilliams/repos",
"events_url": "https://api.github.com/users/nicowilliams/events{/privacy}",
"received_events_url": "https://api.github.com/users/nicowilliams/received_events",
"type": "User",
"site_admin": false
},
"labels": [
{
"url": "https://api.github.com/repos/stedolan/jq/labels/build",
"name": "build",
"color": "eb6420"
}
],
"state": "open",
"locked": false,
"assignee": {
"login": "nicowilliams",
"id": 604851,
"avatar_url": "https://avatars.githubusercontent.com/u/604851?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/nicowilliams",
"html_url": "https://github.com/nicowilliams",
"followers_url": "https://api.github.com/users/nicowilliams/followers",
"following_url": "https://api.github.com/users/nicowilliams/following{/other_user}",
"gists_url": "https://api.github.com/users/nicowilliams/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nicowilliams/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nicowilliams/subscriptions",
"organizations_url": "https://api.github.com/users/nicowilliams/orgs",
"repos_url": "https://api.github.com/users/nicowilliams/repos",
"events_url": "https://api.github.com/users/nicowilliams/events{/privacy}",
"received_events_url": "https://api.github.com/users/nicowilliams/received_events",
"type": "User",
"site_admin": false
},
"milestone": {
"url": "https://api.github.com/repos/stedolan/jq/milestones/7",
"html_url": "https://github.com/stedolan/jq/milestones/1.6%20release",
"labels_url": "https://api.github.com/repos/stedolan/jq/milestones/7/labels",
"id": 882049,
"number": 7,
"title": "1.6 release",
"description": "",
"creator": {
"login": "nicowilliams",
"id": 604851,
"avatar_url": "https://avatars.githubusercontent.com/u/604851?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/nicowilliams",
"html_url": "https://github.com/nicowilliams",
"followers_url": "https://api.github.com/users/nicowilliams/followers",
"following_url": "https://api.github.com/users/nicowilliams/following{/other_user}",
"gists_url": "https://api.github.com/users/nicowilliams/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nicowilliams/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nicowilliams/subscriptions",
"organizations_url": "https://api.github.com/users/nicowilliams/orgs",
"repos_url": "https://api.github.com/users/nicowilliams/repos",
"events_url": "https://api.github.com/users/nicowilliams/events{/privacy}",
"received_events_url": "https://api.github.com/users/nicowilliams/received_events",
"type": "User",
"site_admin": false
},
"open_issues": 29,
"closed_issues": 8,
"state": "open",
"created_at": "2014-11-26T23:57:47Z",
"updated_at": "2015-10-28T02:11:40Z",
"due_on": null,
"closed_at": null
},
"comments": 3,
"created_at": "2015-08-16T05:02:07Z",
"updated_at": "2015-09-06T19:46:16Z",
"closed_at": null,
"body": "`linker.c` needs to include `
I'm not sure why this is failing on nix though
--- FAIL: TestRegister (0.03s)
register_test.go:68: Hello returned "Hello, John Doe", want "\nHello, John Doe"
FAIL
FAIL github.com/neovim/go-client/nvim/plugin 0.053s
Thank you for debugging this issue.
I was playing around with reading lines from a buffer and ran into a parsing error. Specifically I was getting this error
msgpack: cannot convert Int to []uint8
and only part of one of the lines was being read.I am also going to include the test file I used so you can run any tests you'd like.