-
Notifications
You must be signed in to change notification settings - Fork 424
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
debug_print(ln)
fails for temporary values
#1261
Comments
I can't reproduce. Building this example with:
This should disable this feature. The CI would have also caught this error. Can you give more instructions? |
You need to remove "ink-debug" from |
Ahh okay it shouldn't be there. I think it is a left over. Can reproduce it now. |
Can't reproduce the issue with the latest ink! 4.0 release. |
Looked into it. So the story with If you build the contract with if #[cfg(any(feature = "ink-debug", feature = "std"))] {
…
} else {
#[macro_export]
/// Debug messages disabled. Enable the `ink-debug` feature for contract debugging.
macro_rules! debug_print {
($($arg:tt)*) => ();
}
#[macro_export]
/// Debug messages disabled. Enable the `ink-debug` feature for contract debugging.
macro_rules! debug_println {
() => ();
($($arg:tt)*) => ();
}
} (from https://github.com/paritytech/ink/blob/master/crates/env/src/lib.rs). Hence the bug can no longer occur, as what was a temporary variable in Green's original issue report is swallowed by the macros in case the feature is not enabled. |
After #1258, the
debug_print(ln)!
macro fails for temporary variables if the "ink-debug" feature is disabled.The text was updated successfully, but these errors were encountered: