Repository navigation
Windows battery fixes; the root module keeps its spelling (#2788, #809, #1953) - #2793
Merged
Merged
Conversation
added 6 commits
October 28, 2026 18:20
…kips Windows (#2788) On win10 the test failed: 'probe_key.h' file not found. It set only WITH_SDKROOT, which host_c_sysroot reads on macOS alone; Linux reads WITH_LINUX_SYSROOT, and on Windows host_c_sysroot is empty, so there is no second sysroot for the cache key to tell apart. The test sets both variables and skips Windows with that reason.
…ble suffix (#2788) On win10 the battery stopped drop-audit and move-audit before they ran: "missing declared input: C:/Users/Eric/wtr/src/main". The seed there is src/main.exe (#2759); build.w declared and ran "src/main" in five places (the audits' input and baseline, the issue61 fixture's copy). Each now says "src/main" ++ host_exe_suffix(), as the seed target does.
…tions keep it too (#809, #1953) 8f105fe seeded the root's declarations with resolve_normalize_path(name) so they would match the module Resolve registered. That restored the root's imports and broke every consumer that needs the spelling, on every host (TMPDIR ends in '/', so any $TMPDIR program is one): - `with build $TMPDIR/x.w --emit-obj` wrote an object with no main: Codegen.path_is_imported_module_symbol (CodegenTraits.w) compares a declaration's path with source_file, the given spelling, so every root function read as imported and was only declared (macOS 336 B against 2152 B; win10 behav_panic_path_is_canonical, empty .text). - `__FILE__` and panic sites printed the normalized path, not the file byte for byte (win10 behav_1953: `C:/…/t/r/b/boom.w` for `C:\…\t\r\b\boom.w`). The declarations carry the spelling again, and Resolve stores the root module under that same spelling (resolve_from_root_pool_with_prefix); identity stays resolve_canonical_module_key (#592). Sema's lookups by the current module path (module_index_by_path, built from module_paths by Frontend and by every Sema copy) find the root under the one spelling everything carries. Evidence: behav_809_root_path_spelling_keeps_imports now runs each spelling (stdout must be the spelling, then 7) and emits an object that must define main; it fails on the installed compiler (all three spellings: normalized __FILE__, no main) and passes on stage1.
…old (#2788, #2176) On win10 every f64 parse died with an access violation before printing (behav_959, behav_750: "1.5".parse() into f64; a direct std.libc strtold call too, while strtod passed). The PE imports no strtold: the mingw ucrt.lib exports none, so the link took mingwex.lib's gdtoa_strtopx.o strtold (llvm-nm), whose long double is the 80-bit x87 type returned through a hidden pointer. Called as f64 strtold(nptr, endptr), the text was the result slot and the null endptr was read as the text. std.libc's strtold is the correctly rounded double (#2176). The UCRT's own strtold is its strtod (its long double is a double), so both Windows runtimes bind strtod, as the Linux runtimes already do.
…deadline (#2788, #2412) On win10 source-cache-tests failed: a source down at 127.0.0.1:1 was reported as "no complete response within 20 s", not "no connection to 127.0.0.1:1". A refused connect takes 2077 ms there (Windows retries the SYN; measured with tcp_connect_timeout), so five probes and their 1+2+3+4 s pauses outlived the 20 s deadline fetch_url runs the helper under, and the kill replaced the helper's reason with the deadline's. The probe schedule assumed a refused connect is instant ("ten seconds in all"); a host that drops SYNs breaks it on every OS. fetch_url passes its deadline; the helper stops probing when the pause and one more probe like the last would reach it, and says how many it made. The test asks for more than one probe, not five.
Contributor
Author
|
Seed-driven battery GREEN on the stack top ba1cf73 ( |
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.
Six commits, each its own fix (see each message):
--emit-objof any$TMPDIRprogram emitted no main,__FILE__/panic sites printed the normalized pathGate green. Draft until the stack's battery is green.