summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/base/serialize.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/core/base/serialize.lua b/xmake/core/base/serialize.lua
index 7c5c2200c..5ffb6b818 100644
--- a/xmake/core/base/serialize.lua
+++ b/xmake/core/base/serialize.lua
@@ -216,7 +216,9 @@ function serialize._resolveref(root, fenv, ...)
end
if type(pos) ~= "table" then
local vpre = serialize._make(v, {})
- return nil, string.format("unable to resolve [%s] in <root>/%s, which is %s", vpre, table.concat(path, "/", 1, i - 1), pos)
+ table.insert(path, 1, "<root>")
+ local pathstr = table.concat(path, "/", 1, i)
+ return nil, string.format("unable to resolve [%s] in %s, which is %s", vpre, pathstr, pos)
end
pos = pos[v]
end
@@ -335,7 +337,7 @@ end
function stub:__tostring()
local fparams = {}
for i = 1, self.params.n do
- fparams[i] = serialize._make(self.params[i])
+ fparams[i] = serialize._make(self.params[i], {})
end
return string.format("%s(%s)", self.name, table.concat(fparams, ", "))
end