Closed meelkor closed 6 months ago
Is there any point in having the regexp that strict when realistically the extension is only using the major version number?
The point was to prevent false positives from other applications that respond to --version
.
Aah, that makes sense. The version string my executable reports is very general indeed. Maybe the first words of godot -h
(Godot Engine
) could be used instead to validate that?
Yeah, this is the second problem there's been with version strings I didn't expect. I'll definitely have to redo the version checking. It's also duplicated in like 4 places, so it needs to be cleaned up anyways.
Maybe the first words of
godot -h
(Godot Engine
) could be used instead to validate that?
Thanks for the suggestion, I ended up going with this, and the regex:
/^Godot Engine v(([34])\.([0-9]+)(?:\.[0-9]+)?)/
This is being fixed in #553.
Is there any point in having the regexp that strict when realistically the extension is only using the major version number?
I forgot to mention that it's also using the minor version to check if the Godot binary supports LSP headless mode.
Godot version
4.2.stable.arch_linux
VS Code version
1.84.2
Godot Tools VS Code extension version
master
System information
Arch Linux
Issue description
Not sure whether this is general 4.2 problem or it's OS-specific but: The default version of godot in Arch Linux repository has the following version string:
4.2.stable.arch_linux
which currently isn't correctly parsed by the extension since the regexp expects the 9 character build hash(?) which is missing. Resulting in:Changing the expression to
/([34])\.([0-9]+)\./
solves the issue. Is there any point in having the regexp that strict when realistically the extension is only using the major version number?Steps to reproduce
not applicable