Skip to content

Conversation

@xcaeser
Copy link
Contributor

@xcaeser xcaeser commented Aug 23, 2025

Update the build process for clarity and improve memory management across various modules. Adjustments include changing the minimum Zig version, refining output handling, and ensuring consistent use of allocators in tests and structures.

- Commented out library tests in build.zig for clarity.
- Changed minimum Zig version to 0.15.1 in build.zig.zon.
- Modified root.zig to accept a Writer for output instead of using log.
- Updated bandwidth.zig tests to use std.Thread.sleep for consistency.
- Adjusted fast.zig to improve memory allocation handling.
- Enhanced http_latency_tester.zig to manage latencies with allocator.
- Refined speed_worker.zig to utilize std.Thread.sleep for delays.
- Improved measurement_strategy.zig to handle speed measurements with allocator.
- Updated main.zig to flush writer after command execution.
Copy link
Contributor Author

@xcaeser xcaeser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I updated the code to 0.15.1, some major breakage i had to work through in the arraylists and http.client.

  • zli updated to 4.1.0 => read here https://github.com/xcaeser/zli/releases/tag/v4.1.0

  • still an issue on upload, fast-cli -u, i let you fix that :)

  • in build.zig, i commented out the tests, i let you work through them, otherwise no fun in that :)

  • don't forget to update the fast-cli version

@xcaeser xcaeser changed the title Refactor build process and enhance memory management Updated to zig 0.15.1 and zli 4.1.0 Aug 23, 2025
@mikkelam
Copy link
Owner

  • I updated the code to 0.15.1, some major breakage i had to work through in the arraylists and http.client.

    • zli updated to 4.1.0 => read here https://github.com/xcaeser/zli/releases/tag/v4.1.0

    • still an issue on upload, fast-cli -u, i let you fix that :)

    • in build.zig, i commented out the tests, i let you work through them, otherwise no fun in that :)

    • don't forget to update the fast-cli version

Thanks a lot bro❤️ I'll look into the issues 🙏

@mikkelam mikkelam requested a review from Copilot August 28, 2025 17:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the project to use Zig 0.15.1 and zli 4.1.0, requiring significant API changes throughout the codebase to accommodate breaking changes in these versions.

  • Updates minimum Zig version requirement and zli dependency
  • Migrates from deprecated std.time.sleep to std.Thread.sleep
  • Adapts to new HTTP client API and ArrayList/Writer interfaces
  • Updates CLI framework integration with new zli API structure

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
build.zig.zon Updates minimum Zig version to 0.15.1 and zli dependency to 4.1.0
build.zig Comments out library tests and updates executable configuration structure
src/main.zig Adds writer interface for CLI output handling
src/cli/root.zig Updates CLI command initialization and removes logging in favor of spinner output
src/lib/workers/speed_worker.zig Migrates sleep calls and HTTP client response handling
src/lib/measurement_strategy.zig Updates ArrayList initialization and memory management
src/lib/http_speed_tester_v2.zig Migrates sleep function calls
src/lib/http_latency_tester.zig Updates HTTP request API and ArrayList handling
src/lib/fast.zig Updates HTTP client and ArrayList API usage
src/lib/bandwidth.zig Migrates sleep function calls in tests
Comments suppressed due to low confidence (1)

src/lib/workers/speed_worker.zig:1

  • The type std.Io.Writer.Allocating does not exist in Zig's standard library. This should likely be std.ArrayList(u8).init(allocator) or use the appropriate writer type from the standard library.
const std = @import("std");

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mikkelam mikkelam merged commit af4d397 into mikkelam:main Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants