Upgrade all the thingies

This commit is contained in:
Lyssieth 2025-05-02 06:26:27 +03:00
parent 599330f0da
commit 68b73910da
Signed by untrusted user who does not match committer: lyssieth
GPG key ID: 200268854934CFAB
5 changed files with 16 additions and 14 deletions

View file

@ -1,10 +1,12 @@
.{
.name = "lys",
.name = .lys,
.version = "0.0.0",
.fingerprint = 0x897d096f61b9ad7b,
.dependencies = .{
.chameleon = .{
.url = "git+https://github.com/tr1ckydev/chameleon#9724f89ca2e56b33609090a6c6c6c1097844d1ee",
.hash = "12208314a762057bf5ed82b26b02cbfcf426066b9920bfdd1ddcb68d1d0c55c45ce3",
.url = "git+https://github.com/tr1ckydev/chameleon#ae88d41f061adbf3d8bb569519cb065aad65db06",
.hash = "chameleon-2.0.1-ZOxajfpzAADVWecH5mnE4qGV7vO3aMfLPvFUzvQbMqdg",
},
},
.paths = .{

View file

@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1732014248,
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
"lastModified": 1746064326,
"narHash": "sha256-r7IZkN9NhK/IO9/J6D9ih2P1OXb67nr5HaQ1YAte18w=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
"rev": "91bf6dffa21c7709607c9fdbf9a6acb44e7a0a5d",
"type": "github"
},
"original": {

View file

@ -157,11 +157,11 @@ fn initFromParsed(comptime T: type, allocator: Allocator, flags: []Arg) !T {
const this = @TypeOf(result);
const info = @typeInfo(this);
if ((info.Struct.fields.len -| 1) == 0) {
if ((info.@"struct".fields.len -| 1) == 0) {
return result;
}
inline for (info.Struct.fields) |field| {
inline for (info.@"struct".fields) |field| {
if (comptime std.mem.eql(u8, field.name, "allocator")) {
continue; // skip allocator
}
@ -242,7 +242,7 @@ fn initFromParsed(comptime T: type, allocator: Allocator, flags: []Arg) !T {
}
switch (fieldType) {
.Optional => |_| {
.optional => |_| {
log.debug("flag `{s}` is optional, and we couldn't find a value for it, so leaving as default value", .{f.name});
comptime continue;
},
@ -356,7 +356,7 @@ fn initFromParsed(comptime T: type, allocator: Allocator, flags: []Arg) !T {
}
} else {
switch (fieldType) {
.Optional => {
.optional => {
if (!builtin.is_test) {
log.warn("could not find positional argument for `{s}`, using default value", .{field.name});
}

View file

@ -20,12 +20,12 @@ fn parseEnumFromStr(comptime T: type, str: []const u8) !T {
const info = @typeInfo(T);
comptime {
if (std.meta.activeTag(info) != .Enum) {
if (std.meta.activeTag(info) != .@"enum") {
@compileError("Expected enum type, got " ++ @typeName(T));
}
}
inline for (info.Enum.fields) |field| {
inline for (info.@"enum".fields) |field| {
const lowerFieldName = try std.ascii.allocLowerString(heapAllocator, field.name);
defer heapAllocator.free(lowerFieldName);
if (std.mem.eql(u8, lowerFieldName, lower)) {
@ -41,7 +41,7 @@ fn parseEnumFromStr(comptime T: type, str: []const u8) !T {
log.err("could not parse `{s}` as enum `{s}`", .{ str, @typeName(T) });
log.warn("hint: try one of the following:", .{});
inline for (info.Enum.fields) |field| {
inline for (info.@"enum".fields) |field| {
const lowerFieldName = try std.ascii.allocLowerString(heapAllocator, field.name);
defer heapAllocator.free(lowerFieldName);
log.warn("- {s}", .{lowerFieldName});

View file

@ -6,7 +6,7 @@ const SmartString = @import("../util/utils.zig").SmartString;
const log = std.log;
pub const Level = log.Level;
pub const Scope = @Type(.EnumLiteral);
pub const Scope = @Type(.enum_literal);
pub const Color = enum {
red,