Repository navigation
Conversation
| .input = if (input) |bytes| .fixed(bytes) else null, | ||
| .output = if (write_enabled) | ||
| std.array_list.Managed(u8).init(std.testing.allocator) | ||
| std.array_list.Managed(u8).init(std.testing.allocator) // zlinter-disable-current-line no_deprecated |
There was a problem hiding this comment.
Should be able to just .init here
| const uart_regs = uart.get_regs(); | ||
| const peri_freq = config.clock_config.peri.?.frequency(); | ||
| uart.set_baudrate(config.baud_rate, peri_freq); | ||
| uart.set_baudrate(config.baud_rate, peri_freq); // zlinter-disable-current-line no_deprecated |
There was a problem hiding this comment.
What is deprecated here?
There was a problem hiding this comment.
microzig/port/raspberrypi/rp2xxx/src/hal/uart.zig
Lines 532 to 533 in 968d998
There was a problem hiding this comment.
Hah, I guess that is how the linted figures a function is deprecated.
| var sram = aviron.FixedSizeMemory(mcu_config.sram_size, .{ .address_type = u24 }){}; | ||
|
|
||
| var stdout = std.array_list.Managed(u8).init(gpa); | ||
| var stdout = std.array_list.Managed(u8).init(gpa); // zlinter-disable-current-line no_deprecated |
There was a problem hiding this comment.
(See comment from other PR)
| path: []const u8, | ||
| source: []const u8, | ||
| issues: *std.ArrayListUnmanaged(Issue), | ||
| issues: *std.ArrayListUnmanaged(Issue), // zlinter-disable-current-line no_deprecated |
There was a problem hiding this comment.
This is just a normal arraylist now. We already pass allocator to append
| entries: std.array_list.Managed(Patch), | ||
| entries: std.array_list.Managed(Patch), // zlinter-disable-current-line no_deprecated | ||
|
|
||
| pub fn append(list: *PatchList, patch: Patch) void { |
There was a problem hiding this comment.
Why not just add an allocator to the struct and pass it along to list.append?
|
|
||
| var chips = std.array_list.Managed(MicroZig.Chip).init(allocator); | ||
| var boards = std.array_list.Managed(MicroZig.Board).init(allocator); | ||
| var chips: std.ArrayList(MicroZig.Chip) = .empty; |
| }) catch @panic("OOM"), | ||
| }; | ||
| } else if (target.cpu.arch.isRISCV() and target.ptrBitWidth() == 32) { | ||
| } else if (target.cpu.arch.isRiscv() and target.ptrBitWidth() == 32) { |
There was a problem hiding this comment.
when did this change? How did this build?
There was a problem hiding this comment.
/// Deprecated; to be removed in 0.18.0. Use `isRiscv` instead.
pub const isRISCV = isRiscv;
looks like during the 0.17.0 dev cycle
There was a problem hiding this comment.
weird. I just didn't expect a case-change in a name to get a re-assign to support the deprecate.
Why isn't this caught?
https://github.com/ZigEmbeddedGroup/microzig/blob/main/core/src/utilities.zig#L775
There was a problem hiding this comment.
it is using zls under the hood and zls doesn't work too well with microzig
968d998 to
534e252
Compare
mattnite
left a comment
There was a problem hiding this comment.
Fix the ignore comments for the linter and then this is good to go. I want them gone.
Stack created with GitHub Stacks CLI • Give Feedback 💬