Skip to content

update to zig 0.15.1 - #86

Merged
kioz-wang merged 8 commits into
mainfrom
feature/update-to-zig-0151
May 5, 2026
Merged

kioz-wang merged 8 commits into
mainfrom
feature/update-to-zig-0151

Conversation

@kioz-wang

Copy link
Copy Markdown
Owner

No description provided.

npc1054657282 and others added 8 commits September 1, 2025 17:31
Currently all tests pass (Removed a test that could not be restored,
changed the expected result of a test, and changed the usage of several
tests to workarounds). The log output to stderr is generally the
same as in the previous version, but there are some differences due to
changes in the default structure printing behavior.

Due to changes in how formatted strings are handled in
zig 0.15.1, testing for adding formatting options for non-numeric
printing is permanently broken, and there's no low-cost workaround.

Furthermore, changes to zig's default formatting for structure printing
have forced some tests to modify their expected results. This change
primarily affects logging results. To restore the original behavior,
a future workaround might involve copying the zig standard library code
from an older version.
Although it may seem that the undefined here is insignificant,
when logging, the undefined slice printed here will cause the
memory protection to be triggered.
1. The parameter style of `StyleRecord.format` is inconsistent.
2. The behavior of some parts of `isOptional` and `isMultiple`
  in `fmt.formatNumber` is inconsistent with the original
  (specifically, `options` is incorrectly not inherited in `isOptional`,
  and in `isMultiple`, the logic for `begin`, `separator`, and `end`
  incorrectly inherits `options`).
  Eliminate the redundant duplications in `fmt.formatNumber`.
1.In the internal implementation of `format`, for APIs that require
  `std.fmt.Options` parameters, some uses of `.{}` are intended
  by design, while others are due to the upgrade in Zig version 0.15.1,
  which prohibited format options of non-numeric types.
  There is a conscious distinction made between them.
2.Refactor `Range.format` and `Range.formatNumber` to make them use
  `Any.formatInner` directly.
Modify the readme code that cannot be executed in zig 15.0.1 version.
"不用考虑 workaround,不接受使用旧的 stdlib 代码,我希望这个项目始终跟上 zig
新的特性,直到 zig 1.0。如果 zig 发生重大变化,我会考虑重构 zargs 的部分代码。
总之不要考虑任何会背上历史包袱的方案。"
Modify dependency to kioz-wang/zterm/v0.15.0-alpha.0
@kioz-wang kioz-wang added this to the release v0.15.0 milestone May 5, 2026
@kioz-wang kioz-wang self-assigned this May 5, 2026
@kioz-wang kioz-wang linked an issue May 5, 2026 that may be closed by this pull request
@kioz-wang
kioz-wang merged commit 8c117fb into main May 5, 2026
4 of 5 checks passed
@kioz-wang
kioz-wang deleted the feature/update-to-zig-0151 branch May 5, 2026 11:13
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.

Update to zig 0.15.1

2 participants