diff options
author | V1K1NGbg <victor@ilchev.com> | 2024-07-23 16:46:06 +0300 |
---|---|---|
committer | V1K1NGbg <victor@ilchev.com> | 2024-08-05 20:49:17 +0300 |
commit | 1747856cf5f775507ad2e7b39b635437c7169a19 (patch) | |
tree | 70e2fa62061817412f83c7916d69023e9a48e7b7 | |
parent | 4f434861ea892ebd04e1341b63bfa1540e2db73c (diff) | |
download | luarocks-1747856cf5f775507ad2e7b39b635437c7169a19.tar.gz luarocks-1747856cf5f775507ad2e7b39b635437c7169a19.tar.bz2 luarocks-1747856cf5f775507ad2e7b39b635437c7169a19.zip |
fix attempt 5
-rw-r--r-- | src/luarocks/core/util.tl | 2 | ||||
-rw-r--r-- | src/luarocks/type/rockspec.lua | 56 |
2 files changed, 29 insertions, 29 deletions
diff --git a/src/luarocks/core/util.tl b/src/luarocks/core/util.tl index ffdb6bc4..e934c52a 100644 --- a/src/luarocks/core/util.tl +++ b/src/luarocks/core/util.tl | |||
@@ -192,7 +192,7 @@ function util.split_string(str: string, delim: string, maxNb?: number): {string} | |||
192 | for part, pos in string.gmatch(str, pat) do | 192 | for part, pos in string.gmatch(str, pat) do |
193 | nb = nb + 1 | 193 | nb = nb + 1 |
194 | result[nb] = part | 194 | result[nb] = part |
195 | lastPos = tonumber(pos) as integer | 195 | lastPos = tonumber(pos) as integer --? cast because math.tointeger returns an integer? |
196 | if nb == maxNb then break end | 196 | if nb == maxNb then break end |
197 | end | 197 | end |
198 | -- Handle the last field | 198 | -- Handle the last field |
diff --git a/src/luarocks/type/rockspec.lua b/src/luarocks/type/rockspec.lua index 63ceabf6..0b3cf31f 100644 --- a/src/luarocks/type/rockspec.lua +++ b/src/luarocks/type/rockspec.lua | |||
@@ -135,35 +135,35 @@ local rockspec_formats, versions = type_check.declare_schemas({ | |||
135 | } | 135 | } |
136 | }) | 136 | }) |
137 | 137 | ||
138 | type_rockspec.order = {"rockspec_format", "package", "version", | 138 | -- type_rockspec.order = {"rockspec_format", "package", "version", |
139 | { "source", { "url", "tag", "branch", "md5" } }, | 139 | -- { "source", { "url", "tag", "branch", "md5" } }, |
140 | { "description", {"summary", "detailed", "homepage", "license" } }, | 140 | -- { "description", {"summary", "detailed", "homepage", "license" } }, |
141 | "supported_platforms", "dependencies", "build_dependencies", "external_dependencies", | 141 | -- "supported_platforms", "dependencies", "build_dependencies", "external_dependencies", |
142 | { "build", {"type", "modules", "copy_directories", "platforms"} }, | 142 | -- { "build", {"type", "modules", "copy_directories", "platforms"} }, |
143 | "test_dependencies", { "test", {"type"} }, | 143 | -- "test_dependencies", { "test", {"type"} }, |
144 | "hooks"} | 144 | -- "hooks"} |
145 | 145 | ||
146 | -- type_rockspec.order = { | 146 | type_rockspec.order = { |
147 | -- "rockspec_format", | 147 | "rockspec_format", |
148 | -- "package", | 148 | "package", |
149 | -- "version", | 149 | "version", |
150 | -- "source", | 150 | "source", |
151 | -- "description", | 151 | "description", |
152 | -- "supported_platforms", | 152 | "supported_platforms", |
153 | -- "dependencies", | 153 | "dependencies", |
154 | -- "build_dependencies", | 154 | "build_dependencies", |
155 | -- "external_dependencies", | 155 | "external_dependencies", |
156 | -- "build", | 156 | "build", |
157 | -- "test_dependencies", | 157 | "test_dependencies", |
158 | -- "test", | 158 | "test", |
159 | -- "hooks", | 159 | "hooks", |
160 | -- sub_orders = { | 160 | sub_orders = { |
161 | -- ["source"] = { "url", "tag", "branch", "md5" }, | 161 | ["source"] = { "url", "tag", "branch", "md5" }, |
162 | -- ["description"] = {"summary", "detailed", "homepage", "license" }, | 162 | ["description"] = {"summary", "detailed", "homepage", "license" }, |
163 | -- ["build"] = { "type", "modules", "copy_directories", "platforms" }, | 163 | ["build"] = { "type", "modules", "copy_directories", "platforms" }, |
164 | -- ["test"] = { "type" } | 164 | ["test"] = { "type" } |
165 | -- } | 165 | } |
166 | -- } | 166 | } |
167 | 167 | ||
168 | local function check_rockspec_using_version(rockspec, globals, version) | 168 | local function check_rockspec_using_version(rockspec, globals, version) |
169 | local schema = rockspec_formats[version] | 169 | local schema = rockspec_formats[version] |