diff --git a/share/qtcreator/lua-plugins/luals/luals.lua b/share/qtcreator/lua-plugins/luals/luals.lua index ed41112748a..f14c88f4fe0 100644 --- a/share/qtcreator/lua-plugins/luals/luals.lua +++ b/share/qtcreator/lua-plugins/luals/luals.lua @@ -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() diff --git a/share/qtcreator/lua-plugins/luatests/luatests.lua b/share/qtcreator/lua-plugins/luatests/luatests.lua index 7cf36c79bc5..ba2ec28f42e 100644 --- a/share/qtcreator/lua-plugins/luatests/luatests.lua +++ b/share/qtcreator/lua-plugins/luatests/luatests.lua @@ -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, diff --git a/share/qtcreator/lua-plugins/rustls/rustls.lua b/share/qtcreator/lua-plugins/rustls/rustls.lua index 5465b289bd2..b3a1d6de598 100644 --- a/share/qtcreator/lua-plugins/rustls/rustls.lua +++ b/share/qtcreator/lua-plugins/rustls/rustls.lua @@ -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() diff --git a/share/qtcreator/lua-plugins/tellajoke/tellajoke.lua b/share/qtcreator/lua-plugins/tellajoke/tellajoke.lua index 357eb9f4a6b..b409d04b037 100644 --- a/share/qtcreator/lua-plugins/tellajoke/tellajoke.lua +++ b/share/qtcreator/lua-plugins/tellajoke/tellajoke.lua @@ -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]] diff --git a/src/plugins/languageclient/lualanguageclient/LuaLanguageClient.json.in b/src/plugins/languageclient/lualanguageclient/LuaLanguageClient.json.in index 581823c7159..7131402100e 100644 --- a/src/plugins/languageclient/lualanguageclient/LuaLanguageClient.json.in +++ b/src/plugins/languageclient/lualanguageclient/LuaLanguageClient.json.in @@ -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", diff --git a/src/plugins/lua/Lua.json.in b/src/plugins/lua/Lua.json.in index 513a9151429..f5d50c488c2 100644 --- a/src/plugins/lua/Lua.json.in +++ b/src/plugins/lua/Lua.json.in @@ -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", diff --git a/src/plugins/lua/luapluginspec.cpp b/src/plugins/lua/luapluginspec.cpp index 2fe6c2c4e9f..2df6b763822 100644 --- a/src/plugins/lua/luapluginspec.cpp +++ b/src/plugins/lua/luapluginspec.cpp @@ -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); }