Can't start watcher, weird channel errors? Data is 000

オープン
#22 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
vim
領域
documentation

調査の方向性

レポートに示されているREADMEの設定例から始め、Vimによる数値と文字列の値の扱いと比較してください。言及されているAWStartの検証とchannel-errorの動作を確認し、そのうえで想定されるhost設定を明確にし、文書化された設定が動作すること、または動作しない場合に有用なフィードバックを生成することを検証してください。

索引モデルが issue の本文から書いたものです。

説明

I finally decided to activitywatch after only knowing about this project for 4 years.

I installed this plugin and needed to copy some of the configuration to my vimrc. Spoiler alert: I did this: let g:aw_apiurl_host = 127.0.0.1.

Fast forward two hours of me learning lots about the rest API of aw-server, jobs and vim channels, trying to debug why curl -s http://127001/api/0/buckets/<hostname>/ wasn't working only to realise if you actually put let g:aw_apiurl_host = 127.0.0.1 into your vimrc then you're gonna have a BAD time. 127.0.0.1 actually concatenates that into 127001 and doesn't throw an error like how I would it expect it to do. So that's a learning.

My own debug logs of this, the "channel data" is somehow 000?
logs

Not sure what can be done with this, I tried to add some validation:

function! AWStart()
    " :h types here
    if type(s:apiurl_host) != 1
        echoerr "g:apiurl_host must be a string!"
        return
    endif
    if type(s:apiurl_port) != 0
        echoerr "g:apiurl_host must be a number!"
        return
    endif
    call s:CreateBucket()
endfunc

But since it's a string it passed my ad-hoc validation.

Naturally, I can blame the documentation: he said sarcastically, please don't hurt me

readme
Not sure what to make of this issue, but it hopefully makes someone that is having the same issue that might be searching github issues to find me in 2021 writing a post mortem 3 minutes to 1 am at a rainy wednesday night/morning.

Feel free to do whatever to this issue.

主要言語
Vim Script
スター
124
フォーク
15
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ActivityWatch/aw-watcher-vim のほかの issue

ActivityWatch/aw-watcher-vim の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。