-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal runtime errors for all code built by Rust 1.48 and above #331
Comments
maybe for now we should report that as regression as described here? |
I suspect the regression is in |
A workaround is using this patch: koute/stdweb#411 (comment) |
I can confirm that this works: # append to Cargo.toml
[patch.crates-io]
stdweb = { git = 'https://github.com/arturoc/stdweb.git' } I was able to change the rust version to 1.51.0 😸 Which also allowed me to install a proper panic handler (although this is a bit off-topic):pub fn halt() {
log::warn!("halting execution. run `Memory.halted = false` to continue.");
screeps::memory::root().set("halted", true);
}
fn main() {
panic::set_hook(Box::new(|panic_info| {
if let Some(location) = panic_info.location() {
log::error!(
"panic: {}:{}: {}",
location.file(),
location.line(),
panic_info
);
} else {
log::error!("panic: {}", panic_info);
}
// use this in your game loop to not execute anything if you want to stop after a panic.
screeps::memory::root().set("halted", true);
}));
} |
Rust nightly builds have been bumped up to 1.49, and when built with this version both my live bot's code and our sample begin throwing runtime stdweb conversion errors:
If we're unlucky, this breakage will carry down to stable like it did with #287 👎 ; probably #329 will be our way forward since stdweb isn't showing any signs of life.
The text was updated successfully, but these errors were encountered: