{"action":"created","issue":{"url":"https://api.github.com/repos/neovim/neovim/issues/4723","repository_url":"https://api.github.com/repos/neovim/neovim","labels_url":"https://api.github.com/repos/neovim/neovim/issues/4723/labels{/name}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/4723/comments","events_url":"https://api.github.com/repos/neovim/neovim/issues/4723/events","html_url":"https://github.com/neovim/neovim/pull/4723","id":153651245,"number":4723,"title":"[RFC] allow stderr handler for rpc jobs","user":{"login":"bfredl","id":1363104,"avatar_url":"https://avatars.githubusercontent.com/u/1363104?v=3","gravatar_id":"","url":"https://api.github.com/users/bfredl","html_url":"https://github.com/bfredl","followers_url":"https://api.github.com/users/bfredl/followers","following_url":"https://api.github.com/users/bfredl/following{/other_user}","gists_url":"https://api.github.com/users/bfredl/gists{/gist_id}","starred_url":"https://api.github.com/users/bfredl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfredl/subscriptions","organizations_url":"https://api.github.com/users/bfredl/orgs","repos_url":"https://api.github.com/users/bfredl/repos","events_url":"https://api.github.com/users/bfredl/events{/privacy}","received_events_url":"https://api.github.com/users/bfredl/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neovim/neovim/labels/RFC","name":"RFC","color":"e6e6e6"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-05-08T11:56:06Z","updated_at":"2016-08-12T14:15:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/neovim/neovim/pulls/4723","html_url":"https://github.com/neovim/neovim/pull/4723","diff_url":"https://github.com/neovim/neovim/pull/4723.diff","patch_url":"https://github.com/neovim/neovim/pull/4723.patch"},"body":"it seems mighty inconvenient that there is no way to get the stderr of a failed rplugin host other than looking in a log file that 1) might not exist 2) might be full of unrelated debug messages. \r\n\r\nThis is the ugly hack/ad-hoc solution that add some job control callback logic to rpc channels. I suppose a \"proper\" way could be refactor channels to use `JobTerminalData` for job channels. (`Channel.data.process` would then be a pointer to this structure) This would also enable using `jobpid()`/`jobstop()` on a job channel.\r\n\r\nThere was an issue for this #2463 but I noticed again that `rpcstart(cmd, args)`is inconsistent with `jobstart([cmd, args...])`. We could handle this in a backwards-incompatible way by checking if the second argument is a list or a dict. Alternatively we could use `jobstart(..., {\"rpc\": v:true})` in analogy with `\"pty\"` (which also changes the available callbacks and functions)"},"comment":{"url":"https://api.github.com/repos/neovim/neovim/issues/comments/239457848","html_url":"https://github.com/neovim/neovim/pull/4723#issuecomment-239457848","issue_url":"https://api.github.com/repos/neovim/neovim/issues/4723","id":239457848,"user":{"login":"bfredl","id":1363104,"avatar_url":"https://avatars.githubusercontent.com/u/1363104?v=3","gravatar_id":"","url":"https://api.github.com/users/bfredl","html_url":"https://github.com/bfredl","followers_url":"https://api.github.com/users/bfredl/followers","following_url":"https://api.github.com/users/bfredl/following{/other_user}","gists_url":"https://api.github.com/users/bfredl/gists{/gist_id}","starred_url":"https://api.github.com/users/bfredl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfredl/subscriptions","organizations_url":"https://api.github.com/users/bfredl/orgs","repos_url":"https://api.github.com/users/bfredl/repos","events_url":"https://api.github.com/users/bfredl/events{/privacy}","received_events_url":"https://api.github.com/users/bfredl/received_events","type":"User","site_admin":false},"created_at":"2016-08-12T14:15:34Z","updated_at":"2016-08-12T14:15:34Z","body":"> Instead of overloading job_close consider introducing job_status which returns a dict that includes the channel ID.\r\n\r\nThis PR already introduces a way for getting the rpc channel id from the job id. I'll tell you it's very simple:\r\n\r\n`let chan_id = job_id`\r\n\r\n>  it could be the case if we adopt the more generic nature of Vim's channels. \r\n\r\nI hope this doesn't mean \"vim's confusing way to name and identify stuff\". Vim doesn't not associate, say a stdout channel and a stderr channel with a job, instead it associates one channel with a job with stdout and stderr \"parts\". At that point one could just as well identify the channel (which is not a generic object but specifically a \"job channel\") with the job.\r\n\r\nAs I said before to extend nvim's way of doing stuff  to handle i.e. byte based sockets need nothing more than _renaming_ functions, not any deeper change to somehow give our interface a \"generic nature\".  Maybe \"channel\" then should be the _name_ of the most generic _concept_ (consisting both jobs and sockets, with both rpc and bytes protocols), but not some separate object that somehow is associated with jobs or sockets, the \"way to get the channel id from the job id\" should still be the simple formula above. Then `jobsend` and `jobclose` could be `chan_send()` and `chan_close()` (personally I would like just `send()` and `close()` but has probably to high conflict risk...) but still work exactly the same when the first argument is a job.\r\n"}}
{"actor":{"display_login":"bfredl"}}