vladdeSV/vscode-klog

Show warning for specific versions of `klog` tool w/ OS

Closed this issue · 6 comments

This extension relies on the "json" feature of klog, which was shipped in version 1.6.

  • Attempting to use any version prior to this will not function at all.
  • The method used to fetch JSON data (stdin, piping data) did not work on Windows until version 2.3. This fail on Windows, but works on other operating systems
  • Stdin stopped working on Windows again in version 3.0 (fixed in version 3.1).

Breifly, one could summarize that this extension will not work under either of the following conditions:

  • klog.version < 1.6
  • os == 'windows' && (klog.version < 2.3 || klog.version == 3.0)

This should be easily detectable with klog version, and a warning/error should appear which explains the klog binary is incompatible.

@jotaen Am I missing something in the list of criteria? I've only tested on Windows, but I assume klog json has always worked on mac / linux.

As a side note, do you think supporting klog <2.3 on Windows is something that should be implemented? Previously I created a temporary file and wrote/read from that. Not the cleanest solution, but it can be done.

Do you have any statistics on how many are using klog, which version, and on which OS?

Am I missing something in the list of criteria? I've only tested on Windows, but I assume klog json has always worked on mac / linux.

I think that looks good. Apart from the Windows bugs, the json command worked the same everywhere.

As a side note, do you think supporting klog <2.3 on Windows is something that should be implemented? Previously I created a temporary file and wrote/read from that. Not the cleanest solution, but it can be done.

Personally, I wouldn’t bother with backwards compatibility, at least not if it creates extra work. There is also no good reason for people to stay on old versions anyway.

Do you have any statistics on how many are using klog, which version, and on which OS?

No, I don’t know reliably how many people are using it regularly, I can only roughly infer. It’s certainly not a lot, so I’d be surprised if it’s more than, say, 100 people who use klog.

This should be easily detectable with klog version

You might know it anyway, but just in case: the easiest is to run klog version --no-check --quiet, which skips the online check and only prints the version without any additional text.

I think that looks good. Apart from the Windows bugs, the json command worked the same everywhere.

Awesome. Good to know!

Personally, I wouldn’t bother with backwards compatibility, at least not if it creates extra work. There is also no good reason for people to stay on old versions anyway.

Yeah, that seems reasonable.

You might know it anyway, but just in case: the easiest is to run klog version --no-check --quiet, which skips the online check and only prints the version without any additional text.

Oh, I did not! Thanks for the tip 😄

Note to self: I'm going to shoehorn this into the v1.1 release.

If I, the developer, does not understand why the extension did not work with a specific version of klog, I do not think a user will either.

Should be fixed as of 8e2bb88.

I don't really remember, it's been a while. The code is in need of some clean-up as well.

Uh, I think this is implemented. Closing.