Closed tralezab closed 2 years ago
Right now this is going to cause a backwards incompatibility issue where rustg_read_toml_file
does something different now
I think you should change dmsrc to be like this:
#define rustg_read_toml_file_result(path) json_decode(call(RUST_G, "toml_file_to_json")(path) || "null")
/proc/rustg_read_toml_file(path)
var/output = rustg_read_toml_file_result(path)
if (output["success"])
return output["content"]
else
CRASH(output["content"])
That way existing consumers and consumers that just want to runtime instead of need to manage it can use the existing thing, and anything that wants to especially handle the error case can use rustg_read_toml_file_result
Aye aye, cap'n!
@tralezab Needs to be in dmsrc
Right now this is going to cause a backwards incompatibility issue where
rustg_read_toml_file
does something different nowI think you should change dmsrc to be like this:
#define rustg_read_toml_file_result(path) json_decode(call(RUST_G, "toml_file_to_json")(path) || "null") /proc/rustg_read_toml_file(path) var/output = rustg_read_toml_file_result(path) if (output["success"]) return output["content"] else CRASH(output["content"])
That way existing consumers and consumers that just want to runtime instead of need to manage it can use the existing thing, and anything that wants to especially handle the error case can use
rustg_read_toml_file_result
Make it rustg_raw_read_toml_file()
, result
is questionable.
👍
I don't know what's up with the linux build...
Looks like it is ~encoding~ expected to encode the enabled
field as 1
instead of true
.
you need to fix the unit tests to expect the backtrace
/test/proc/check_toml_file2json ------------------------------------------
@tralezab 🥺
Now I understand what's up I got it
toml to json: One half of better error reporting for things like banned word filters in game, the other half has to be displaying the error on DM side.
rust-analyzer.cargo.target: fixes #86 and let me say holy shit that was one hellish part of getting the analyzer working