Skip to content

Old version of wakatime-cli causes failures when sending heartbeats #13

Open
@Daste745

Description

When a system version of wakatime-cli is installed globally, zed-wakatime just uses it without downloading a newer version from github. This could cause an error when you're running an old enough version which doesn't support certain arguments.

For example, installing wakatime from the official Arch Linux repository (extra), which is version 1.60 causes most heartbeats to be dropped due to the --guess-language flag being added only in 1.91. In prior versions it exits the program without doing anything.

This tripped me up because I assumed that I have the latest versions of packages on my system, but I noticed wakatime reporting very low times compared to what they were in previously in vscode.

The solution was to uninstall wakatime-cli from my system's package manager and let the extension auto-download the latest version. I'm not sure if this could be a problem for other systems, because it requires the wakatime-cli package to be under 1.91.

I skimmed through zed's extension API to check if there's a way of running a subshell with i.e. wakatime-cli --version to check if it satisfies some minimum, but it seems they don't provide such functionality.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions