Repository navigation
Set up: read the build's error when the path has an accent - #640
Merged
Merged
Conversation
The game build runs Python with -I, which writes a pipe in the ANSI code page (cp1252 on a Portuguese Windows). Its @error line named the game folder ("OneDrive\Área de Trabalho"), and the launcher's line readers (BufRead::lines + map_while(Result::ok)) stopped at the first line that is not UTF-8, so the reason was dropped and setup.log said only "exit code: 1" (#630). - pkp_build.py writes stdout and stderr as UTF-8 (its --lift-one children too). - child_lines.rs: one line reader for a child's output that reads bytes that are not UTF-8 lossily instead of ending the stream; used by the game build, the shader translator, the shader tools and the DLSS download. pkp_build.py is in no build stamp: nothing is lifted, compiled or translated again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
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.
What it changes
The setup.log in #630 shows every Set up since the first 0.12 attempt ending with
FAILED: game build (exit code: 1). Last error output:and nothing after it, even with 0.11.1, which had built at the same path the day before. The game folder isC:\Users\<user>\OneDrive\Área de Trabalho\....The error was lost on the way to the launcher:
pkp_build.pyruns withpython -I, which writes a pipe in the ANSI code page (cp1252 on a Portuguese Windows). The@errorline names the game folder, so theÁwent out as byte0xC1, which is not UTF-8.BufReader::lines().map_while(Result::ok). That ends the whole stream at the first line that is not UTF-8, so the@errorline and everything after it were dropped.Now:
pkp_build.pywrites stdout and stderr as UTF-8 (reconfigure). That covers its--lift-onechildren too, since they run the same file andlift()already decodes them as UTF-8.launcher/src-tauri/src/child_lines.rshas one line reader for a child's output. It reads bytes that are not UTF-8 lossily (U+FFFD) and keeps going, and strips\n/\r\nthe waylines()did. It replaces all eight readers with the same flaw, ingamebuild.rs,harness.rs,shaders.rsanddlss.rs, and has one unit test (cp1252 bytes in the middle of a stream). The twoexamples/include it by path, like the other modules.The underlying build failure is still unknown; this PR makes the log name it. The failures land within a second, where the script replaces files or deletes folders under
build\, which points at OneDrive holding the files while it syncs the Desktop folder. Moving the game folder out of OneDrive (for exampleC:\Games) is the workaround to suggest until the player's log, on a launcher with this fix, names the error.Fixes #630 (the missing reason; the player's own build failure needs the new log)
For players
CHANGELOG.md## Unreleasedhas an entry (Before / Now / Still not)pkp_build.pyis in no build stamp, so this is Update onlyPros
Cons
pkp_build.py) shows�in place of the accented letter instead of the letter🤖 Generated with Claude Code