Repository navigation
comptime: parse is a With body, tool mode may ask its pid and claim jobserver slots (#2460) - #2462
Merged
Merged
Conversation
… claim jobserver slots (#2460) The SDK rebuild's second round (run 39171886271): linux-aarch64 went green, and both Windows jobs failed one step deeper in build/par.w - par_slot_acquire -> pid -> extern with_getpid, which the evaluator refused. Three fixes at their owners: std.string's string_to_int is a With digit loop instead of the with_parse_i64_ref extern, so parse is comptime-evaluable everywhere (behav_2460_comptime_parse, shown failing before); eval_allowed_runtime_call answers with_getpid, with_fs_symlink and with_fs_remove_file in tool mode, where the evaluator is the build process and the jobserver slot pair is driver state outside any action's write scope; par_lane_critical reads the critical file through the ToolFs capability instead of std.fs's pointer out-param extern. The par_slots_from digit loop from #2461 is deleted - parse is the one spelling again.
Contributor
Author
|
Battery green on 87dd2fd: |
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.
Second round of the SDK rebuild (run 39171886271): linux-aarch64 and darwin went green; both Windows jobs failed one step deeper in
build/par.w:Fixes, each at its owner:
lib/std/string.w:string_to_intis a With digit loop (string_to_int's exact rule), not thewith_parse_i64_refextern — parsing is pure, soparseis now comptime-evaluable everywhere.test/behavior/behav_2460_comptime_parse.wpins it (shown failing before, passing after with stage1).src/ComptimeEval.w: tool mode's allowed runtime calls gainwith_getpid,with_fs_symlink,with_fs_remove_file. In tool mode the evaluator is the build process, so its pid is the slot owner a native runner would name; the slot symlink/remove pair is driver state outside any action's declared write scope by design.build/par.w:par_lane_criticalreads the critical file through the ToolFs capability (read_text_opt) instead of std.fsread_file's pointer out-param extern; thepar_slots_fromdigit loop from SDK rebuild: the four host failures of run 39152082294, each at its line (#2305) #2461 is deleted now thatparseitself is evaluable.Evidence:
:devgreen, stage1check src/main.wok, ceremony census diff ok, nearby tests green (behav_2460, behav_914, behav_2142, test/comptime_diff),:gaterc=0. Battery result posted before ready. Integration proof for the tool-mode whitelist is the SDK re-dispatch after merge (the windows jobs' sdk-windows-libc).Closes the par.w half of #2460; the general question (which std helpers are evaluator-safe) stays open there.