Repository navigation
Merged
Conversation
added 7 commits
October 3, 2026 04:02
…tions above the per-line loop (#2015) `with -n 'use std.time.now_ns; ...'` (and -p) spliced the `use` into the body of `for line in stdin.lines() { ... }`, where a declaration does not parse ("expected expression" at <cli -n #1>:1:1). cli_build_synthetic_source now reads each part's leading `use` declarations from its tokens (cli_leading_use_len: a name like `user` or a `use` in a string is never one; a braced list may span lines), emits them before the loop, and blanks them to spaces in the body so every later byte keeps its line and column (the diagnostic mapping still reads the part's own text). -e already took them: the program is top-level. Tests (cli-selfhost-one-liner-tests): -e/-n/-p with `use`, a `use` in its own -n part, `user` stays code, and a diagnostic after a hoisted `use` maps to <cli -n #1>:2:8. The -n/-p cases fail on v0.15.3.0 with "expected expression".
…ads, not only inside the selected closure (#2014) build_graph_validate_outputs already refused a duplicate output, but run_build_graph ran it over the selected graph (build_graph_filter_target's closure), so linux-sysroot and linux-sysroot-aarch64, which both declare out/gen/linux-sysroot-aarch64.pack on macOS, were never in one closure and never refused. The build and run commands now validate the whole loaded graph before selecting, and the error names both declarers: "duplicate build.w output path: <path> is declared by both target 'a' and target 'b'; every output has exactly one producing target". Test: cli-selfhost-build-w-tests `shared_output` builds one of two actions that declare one output; it must fail naming both, and run neither.
…host `linux-sysroot` placeholder (#2014) Off Linux, `linux-sysroot` was a placeholder that wrote an EMPTY pack at sdk_linux_sysroot_pack() = the host architecture's path, which `linux-sysroot-<host arch>` also declared and filled: on macOS both owned out/gen/linux-sysroot-aarch64.pack (on Windows x86_64, out/gen/linux-sysroot.pack), so the pack depended on which ran last, and linux_sysroot_target_name("aarch64") named the placeholder, so the darwin cross linux-link-pack depended on the empty writer, not the real one. `linux-sysroot` is now a Linux host's own sysroot only; every other architecture's, and every one off Linux, is `linux-sysroot-<arch>`, named by linux_sysroot_target_name in both the declaration and every dep. Off Linux, the link metadata and the host linux-link-pack (which writes an empty pack and reads no sysroot there) no longer depend on it, and run_linux_sysroot_action no longer has an off-Linux empty branch.
…, not only the first (#2014) Found surveying today's build.w with the check: one refusal per run hid the next. Every collision is printed, then the load fails.
…se/<asset> has one producer (#2014) The whole-graph output check (previous commit) refused today's build.w a second time: `sdk-package` (the source-built SDK, the source-sdk action's entry) and `package-llvm-sdk-<host>` (the runbook's repackaging of the .deps SDK) both declared out/release/with-llvm-sdk-<ver>-<host>.tar.gz and its .sha256/.manifest; on linux-x86_64 `sdk-cross-aarch64-package` and `package-llvm-sdk-linux-aarch64` did too. Which archive a release carried depended on which ran last. package_llvm_sdk_platform_target takes its directory: the .deps repackagers keep out/release (tools/release_local.w, the runbook), the source-built ones write out/sdk-release, and run_package_llvm_sdk_action writes beside its stamp, root-relative so the .sha256 sidecar still names the archive relatively. The source-sdk action and sdk-release.yml read out/sdk-release.
…ted C (#2014) The whole-graph output check refused today's build.w a third time: bootstrap-c-emit-sources, emit-c-test and emit-c-roundtrip each declared out/gen/wl_decls.h and out/gen/wl_stubs.c, and each compile read whichever target wrote them last. emitc_generate_stub_files now writes into the emitted C's directory (out/bootstrap-c/src, out/emit-c-test, out/emit-c-roundtrip) and every C compile and migrate includes emitc_decls_beside(main_c); package-bootstrap-c copies the header from out/bootstrap-c/src. With this, the stage1 driver loads today's build.w on darwin with no shared output.
…undles; one store slot, one installer (#2014) The whole-graph output check, run on linux-x86_64, refused every corpus bundle: `<name>-wo-install-{o,wi,manifest}` (the host plan) and `<name>-wo-linux-x86_64-install-*` (the cross plan for the cross-rt compiler, the same target) both installed into <store>/<name>/linux_x86_64-<abi>/; windows-x86_64 has the same pair. cross_wo_plan now returns the host plan for the host's own tag, and cross_wo_bundle_targets registers no second build or install for it: the cross compiler embeds and links the host bundle (out/wo/<name>, built from the same corpus at the same ABI, D38).
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.
Fixes #2014. Fixes #2015. Does not address #2016 (see below).
#2014: two targets, one output
build_graph_validate_outputs(src/BuildGraphDispatch.w) already refused a duplicate output, butrun_build_graphran it over the selected closure (build_graph_filter_target), and linux-sysroot / linux-sysroot-aarch64 were never in one closure. The build and run commands (src/main.w) now validate the whole loaded graph before selecting, and the error names every shared output and both declarers.linux-sysroot(off Linux, a placeholder writing an EMPTY pack) andlinux-sysroot-<host arch>both owned the host-arch pack;linux_sysroot_target_name("aarch64")on macOS named the placeholder.linux-sysrootis now a Linux host's own only; off Linux every pack islinux-sysroot-<arch>.sdk-package/sdk-cross-aarch64-package(source-built SDKs) andpackage-llvm-sdk-<host>(.deps repackaging) all wroteout/release/with-llvm-sdk-*. Source-built SDKs now package intoout/sdk-release; the source-sdk action and sdk-release.yml read it there (release-only workflow: not exercised here).bootstrap-c-emit-sources,emit-c-test,emit-c-roundtripall wroteout/gen/wl_decls.h/wl_stubs.c; each now writes beside its own emitted C.<name>-wo-install-*and<name>-wo-<host>-install-*installed into one store slot. A cross compiler for the host's own target now embeds the host bundle.shared_output(two actions, one output, build one of them: refused, neither runs). Fails on the seed (writer-a runs, rc 0), passes on stage1/release.#2015: one-liner
usecli_build_synthetic_source(src/main.w) spliced -n/-p code into the body offor line in stdin.lines() { ... }, whereusedoes not parse. A part's leadingusedeclarations (read from its tokens) are now hoisted above the loop and blanked to spaces in the body, so diagnostics keep their line/column.use, ausein its own part,userstays code, diagnostic after a hoisted use maps to<cli -n #1>:2:8. -n/-p fail on v0.15.3.0.Not here: #2016
Its four items are defects in the #1899 build store's terms (PR #2008, draft, not on main), and its acceptance ("a second worktree's :dev re-runs none of them") needs that store. It belongs on a layer stacked on wave-build.
Evidence
src/main build :gate: green (fixed list; fresh worktree).:cli-selfhost-one-liner-tests,:cli-selfhost-build-w-tests: green.:emit-c-test: red before the touched code, at C emission of the compiler itself, reproduced on main 0f0d76b's tree: filed emit-C: the compiler's own C is refused at emission: "C backend does not support enum variants with 2 payload fields" (emit-c-test red on main 0f0d76ba) #2017.