Repository navigation
server: capabilities --json's Engines struct moves to cli_capabilities.zig - #1375
Closed
BlivionIaG wants to merge 1 commit into
Closed
BlivionIaG wants to merge 1 commit into
BlivionIaG wants to merge 1 commit into
Conversation
…s.zig cli_capabilities.zig writes the capabilities document, but the Engines struct it reads still sat in cli.zig, which is 598 lines. The struct moves next to its writer and cli.zig re-exports it, so callers do not change. cli.zig drops to 589 lines. capabilities --json prints the same bytes as on main.
Owner
|
Landed on main (2a37b63), thanks @BlivionIaG: a pure move, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branch:
series/capabilities-split, one commit on mainc0c7bd24f.What this changes
cli_capabilities.zigalready writes the capabilities document (mainf3c1ab024).The
Enginesstruct it reads still sat incli.zig.This change moves the struct next to its writer.
cli.zigre-exports it, socli.Enginesandcli.capabilitieskeep working forengines.zig,benchmark.zig,main.zigandcli_test.zig.cli.ziggoes from 598 to 589 lines, so the next serve flags fit under the 600-line limit.No behaviour change.
Files:
zig/src/server/cli.zig(+2 -11),zig/src/server/cli_capabilities.zig(+14 -2).Receipt
c0c7bd24fand this branch06a5236ce, Zig 0.17.0,-Dcpu=apple_m1 -Dversion=1.1.4, Apple M4 Pro, macOS (Darwin 25.5.0).capabilities --json: builtnativefrom main and from the branch and rantensorfold-native capabilities --jsonon each.The two outputs are byte-identical:
cmpreports no difference, both are 6853 bytes, and both have SHA-256cb09db79b76a6681514a9be60a2074d650607bd9cdb4cbb70499a306a2373467.zig build native -Dcpu=apple_m1 -Dversion=1.1.4: exit 0.zig build test-server-cpu -Dcpu=apple_m1: exit 0, 792 of 795 tests passed, 3 skipped (the server test binary 787 pass, 3 skip of 790; a second test step 5 of 5). On main's Zig sources the server test binary gives the same 787 pass, 3 skip of 790 (its 5-test step was cached in that run).zig build test-golden -Dcpu=apple_m1on main's Zig sources: the same 322/335 and 26/26, 0 unexpected differences.zig build test-golden -Dcpu=apple_m1: exit 0; 322/335 and 26/26 equal to server goldens, 0 unexpected differences (the 13 differences are the existing KNOWN-DIFFER entries).zig fmt --checkon both files: exit 0.git diff --check c0c7bd24f: clean.python3 tools/zig/lean_check.py: 433 problems on main and 433 on the branch, the same findings line for line. The baseline findings are inherited; this change adds none.zig build test,test-kernel-contract,fuzz-cortheon, the Linux CUDA host build and HIP. The change touches two server files that every platform compiles the same way; CI's Linux build will cover the non-macOS compile.Tests
No new test. A moved declaration has no failing case to show.
The existing
cli_test.zigcapabilities tests callcli.capabilitieswithcli.Enginesvalues, so they compile and pass through the re-export (part of the 787 above).The byte comparison of the real binary's output is the check that the document did not change.
Not measured
Related PRs
Prerequisite for the DSpark drafter's two serve flags: #1392 sits on this PR. Part of #1374.
Issue
CONTRIBUTING asks for an issue first only for a new model family, backend or arithmetic change. This is none of those, so no issue is needed.
Prerequisite for the DSpark drafter's two serve flags (#1374): they need room in
cli.zig.