Zig 0.17.0 master#954
Conversation
|
|
@Grazfather This is ready to be looked at. Once this PR lands and the master binary is available, this PR should pass CI |
| // TODO: do we use debug_io? | ||
| _ = format; | ||
| _ = args; | ||
| _ = prefix; | ||
|
|
There was a problem hiding this comment.
Can you clarify what the TODO means? Also, I have an Io.Writer implemented for this. If you want I can commit it.
There was a problem hiding this comment.
This TODO is stale. There's a separate std.Io instance for the debug system, passed in through options:
There are two boundaries we could choose for implementing the logger. The first is setting a logging function, which we've always done, and the second is to implement a std.Io for the standard library debug system.
I'm leaning towards implementing a logging function, similar to how you mentioned we should have our own stack iterator. I have a feeling that implementing a std.Io will have some unintended side effects like binary size. I've cut a ticket for research so we can have an informed answer, to be done sometime after 0.17.0 lands:
| var frame_index: usize = 0; | ||
| if (@errorReturnTrace()) |trace| frame_index = utilities.dump_stack_trace(trace); | ||
| // TODO: sit down and determine if we want to provide our own SelfInfo. | ||
| // Is that what plugs into the standard panic? |
There was a problem hiding this comment.
After a quick skim of std.debug, at least on freestanding, the standard panic just traps. Imho, we should keep a custom panic with also a custom StackIterator that doesn't depend on io. SelfInfo might not make sense for embedded as there isn't any debug info available on the device.
That being said, I'm seeing the following from the build output. It seems to be a compiler bug: error: error: Alias and aliasee types don't match (Producer: 'zig 0.16.0' Reader: 'LLVM 21.1.0')
b85d6a9 to
5aee49b
Compare
No description provided.