Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Daste745 opened this issue Jan 8, 2025 · 2 comments
Open

Comments

@Daste745
Copy link
Contributor

Daste745 commented Jan 8, 2025

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.

@bestgopher
Copy link
Collaborator

Maybe we need to check if the version of wakatime-cli is greater than 1.91?

@sachk
Copy link

sachk commented Jan 10, 2025

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.

This is an issue with the current approach, but it is solvable, as looking for and downloading the wakatime-cli could be moved into the wakatime-ls crate. Unfortunately this would require two different approaches for downloading executables in this repo which isn't great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants