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

未关闭
#22 3 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
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. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ActivityWatch/aw-watcher-vim 的其他 Issue

查看 ActivityWatch/aw-watcher-vim 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。