Lua: Bump version number to 15

Also adds exception if LuaCompatibleVersion is higher than
spec version (during development)

Change-Id: I39ab3b19e438c4c1691a2db18d884b9dbd417b19
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Marcus Tillmanns
2024-08-29 10:42:39 +02:00
parent c1a24c57c0
commit c8f7ca63ca
7 changed files with 18 additions and 8 deletions

View File

@@ -16,8 +16,8 @@ This plugin provides the Lua Language Server.
It will try to install it if it is not found.
]],
Dependencies = {
{ Id = "lua", Version = "14.0.0" },
{ Id = "lualanguageclient", Version = "14.0.0" }
{ Id = "lua", Version = "15.0.0" },
{ Id = "lualanguageclient", Version = "15.0.0" }
},
setup = function()
require 'init'.setup()

View File

@@ -15,7 +15,7 @@ return {
It has tests for (almost) all functionality exposed by the API.
]],
Dependencies = {
{ Id = "lua", Version = "14.0.0" }
{ Id = "lua", Version = "15.0.0" }
},
setup = function() require 'tests'.setup() end,
printToOutputPane = true,

View File

@@ -16,8 +16,8 @@ This plugin provides the Rust Language Server.
It will try to install it if it is not found.
]],
Dependencies = {
{ Id = "lua", Version = "14.0.0" },
{ Id = "lualanguageclient", Version = "14.0.0" }
{ Id = "lua", Version = "15.0.0" },
{ Id = "lualanguageclient", Version = "15.0.0" }
},
setup = function()
require 'init'.setup()

View File

@@ -50,7 +50,7 @@ return {
Category = "Fun",
Description = "This plugin adds an action that tells a joke.",
Dependencies = {
{ Id = "lua", Version = "14.0.0" },
{ Id = "lua", Version = "15.0.0" },
},
setup = setup,
} --[[@as QtcPlugin]]

View File

@@ -3,7 +3,7 @@
"Name" : "Lua Language Client",
"Version" : "${IDE_VERSION}",
"CompatVersion" : "${IDE_VERSION_COMPAT}",
"LuaCompatibleVersion" : "14.0.0",
"LuaCompatibleVersion" : "15.0.0",
"DisabledByDefault" : true,
"SoftLoadable" : true,
"VendorId" : "theqtcompany",

View File

@@ -3,7 +3,7 @@
"Name" : "Lua",
"Version" : "${IDE_VERSION}",
"CompatVersion" : "${IDE_VERSION_COMPAT}",
"LuaCompatibleVersion" : "14.0.0",
"LuaCompatibleVersion" : "15.0.0",
"DisabledByDefault" : true,
"SoftLoadable" : true,
"VendorId" : "theqtcompany",

View File

@@ -108,9 +108,19 @@ bool LuaPluginSpec::provides(PluginSpec *spec, const PluginDependency &dependenc
return false;
}
// If luaCompatibleVersion is greater than the dependency version, we cannot provide it.
if (versionCompare(luaCompatibleVersion, dependency.version) > 0)
return false;
// If the luaCompatibleVersion is greater than the spec version, we can provide it.
// Normally, a plugin that has a higher compatibility version than version is in an invalid state.
// This check is used when raising the compatibility version of the Lua plugin during development,
// where temporarily Lua's version is `(X-1).0.8y`, and the compatibility version has already
// been raised to the final release `X.0.0`.
if (versionCompare(luaCompatibleVersion, spec->version()) > 0)
return true;
// If the spec version is greater than the dependency version, we can provide it.
return (versionCompare(spec->version(), dependency.version) >= 0);
}