Compare commits

..
3 Commits
Author SHA1 Message Date
yves-biener 192763649b doc: add missing library name for valid zig code in the examples
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 12m8s
2026-06-08 20:08:27 +02:00
yves-biener 57ffa57992 mod: bump zig version to 0.16.0
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 11m16s
2026-06-07 18:09:47 +02:00
yves-biener 70712b514c mod(ci): update configuration; use latest release version of zig and fix release trigger condition 2026-06-07 18:09:46 +02:00
3 changed files with 10 additions and 15 deletions
-3
View File
@@ -2,9 +2,6 @@ name: Release Zig Application
on: on:
release: release:
types: [published] types: [published]
workflow_run:
workflows: [Zig Project Action]
types: [completed]
jobs: jobs:
release: release:
+1 -2
View File
@@ -1,9 +1,8 @@
.{ .{
.name = .fuzzig, .name = .fuzzig,
// This is a [Semantic Version](https://semver.org/).
.version = "0.0.0", .version = "0.0.0",
.fingerprint = 0x6450ab302d40f9a8, // Changing this has security and trust implications. .fingerprint = 0x6450ab302d40f9a8, // Changing this has security and trust implications.
.minimum_zig_version = "0.16.0-dev.1254+bf15c791f", .minimum_zig_version = "0.16.0",
.dependencies = .{}, .dependencies = .{},
.paths = .{ .paths = .{
"build.zig", "build.zig",
+9 -10
View File
@@ -51,7 +51,7 @@ pub const Result = struct {
/// function when applying to the heap sort algorithm of the standard library. /// function when applying to the heap sort algorithm of the standard library.
/// ///
/// ```zig /// ```zig
/// var results: std.ArrayList(Result) = .empty; /// var results: std.ArrayList(fuzzig.Result) = .empty;
/// // .. /// // ..
/// std.sort.heap(fuzzig.Result, results.items, {}, fuzzig.greaterThan); /// std.sort.heap(fuzzig.Result, results.items, {}, fuzzig.greaterThan);
/// // act on sorted scores: /// // act on sorted scores:
@@ -72,7 +72,7 @@ pub fn greaterThan(_: void, a: Result, b: Result) bool {
/// Given a list of file names, you can match a given string as follows: /// Given a list of file names, you can match a given string as follows:
/// ///
/// ```zig /// ```zig
/// var results: std.ArrayList(Result) = .empty; /// var results: std.ArrayList(fuzzig.Result) = .empty;
/// defer { /// defer {
/// for (results.items) |*result| result.deinit(gpa); /// for (results.items) |*result| result.deinit(gpa);
/// results.deinit(gpa); /// results.deinit(gpa);
@@ -202,6 +202,7 @@ const Allocator = std.mem.Allocator;
test "matching `s` on local files" { test "matching `s` on local files" {
var gpa = testing.allocator; var gpa = testing.allocator;
const io = testing.io;
// files to fuzzy match against // files to fuzzy match against
var files: std.ArrayList([]const u8) = .empty; var files: std.ArrayList([]const u8) = .empty;
@@ -218,13 +219,13 @@ test "matching `s` on local files" {
} }
// arrange // arrange
var dir = try std.fs.cwd().openDir(".", .{ .iterate = true }); var dir = try std.Io.Dir.cwd().openDir(io, ".", .{ .iterate = true });
defer dir.close(); defer dir.close(io);
var iter = try dir.walk(gpa); var iter = try dir.walk(gpa);
defer iter.deinit(); defer iter.deinit();
while (try iter.next()) |entry| { while (try iter.next(io)) |entry| {
switch (entry.kind) { switch (entry.kind) {
.file => { .file => {
if (std.mem.startsWith(u8, entry.path, ".git/")) continue; if (std.mem.startsWith(u8, entry.path, ".git/")) continue;
@@ -249,12 +250,10 @@ test "matching `s` on local files" {
std.sort.heap(Result, results.items, {}, greaterThan); std.sort.heap(Result, results.items, {}, greaterThan);
var buf: [128]u8 = undefined; var buf: [128]u8 = undefined;
var buffer = std.fs.File.stderr().writer(&buf); const stderr = try std.Io.lockStderr(io, &buf, .escape_codes);
var writer = &buffer.interface; var writer = stderr.file_writer;
defer writer.flush() catch unreachable; defer writer.flush() catch unreachable;
defer std.Io.unlockStderr(io);
std.debug.lockStdErr();
defer std.debug.unlockStdErr();
// assert // assert
var scored_entries: usize = 0; var scored_entries: usize = 0;