Repository navigation
[ImpellerC] Escape spaces in depfile paths - #196555
Merged
auto-submit[bot] merged 6 commits intoNov 14, 2026
Merged
Conversation
Compiler::CreateDepfileContents and OutputBundleDepfile joined dependency paths with plain spaces, so a path containing a space reached the consumer as two paths that do not exist. Both writers now escape a space as "\ ", doubling any run of backslashes in front of it, and leave backslashes elsewhere in the path alone.
Adds the depfile tests gaaclarke sketched in review for Compiler::CreateDepfileContents and GenerateShaderBundle.
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces path escaping for depfiles in the Impeller compiler to handle spaces and backslashes. It adds the EscapeDepfilePath utility function and applies it to targets and dependencies in both the shader compiler and shader bundle generator, accompanied by corresponding unit tests. Feedback suggests updating a string prefix check in the unit tests to use C++20's std::string::starts_with for improved readability.
…epfile-spaces # Conflicts: # engine/src/flutter/impeller/compiler/shader_bundle_unittests.cc
b-luk
force-pushed
the
takeover-190985-depfile-spaces
branch
from
November 13, 2026 20:06
c476eb7 to
b1d67ee
Compare
9 of 10 tasks
This was referenced Nov 14, 2026
auto-submit Bot
pushed a commit
to flutter/packages
that referenced
this pull request
Nov 16, 2026
flutter/flutter@1b95854...d8bd864 2026-11-16 [email protected] Roll Skia from f2790b0ea630 to 118eaff3deb4 (8 revisions) (flutter/flutter#196661) 2026-11-16 [email protected] [native_assets] Keep a dylib's install name in flutter test when its path does not fit (flutter/flutter#194802) 2026-11-16 [email protected] Reland "[android]: prewarms shaders when the context is created" (flutter/flutter#196579) 2026-11-16 [email protected] [flutter_tools] Bound Browser.close in Chromium.close (flutter/flutter#196211) 2026-11-16 [email protected] Roll Skia from e8ff7a4187ec to f2790b0ea630 (13 revisions) (flutter/flutter#196652) 2026-11-14 [email protected] Revert: Balance web_canvaskit_tests and web_skwasm_tests subshards by duration (flutter/flutter#196580) 2026-11-14 [email protected] Revert: Reland "[android]: prewarms shaders when the context is created" (flutter/flutter#196575) 2026-11-14 [email protected] [flutter_tools] Guard ExtensionManager initialization against concurrent disposal (flutter/flutter#196459) 2026-11-14 [email protected] [ImpellerC] Escape spaces in depfile paths (flutter/flutter#196555) 2026-11-14 [email protected] Reland "[android]: prewarms shaders when the context is created" (flutter/flutter#196549) 2026-11-14 [email protected] Balance web_canvaskit_tests and web_skwasm_tests subshards by duration (flutter/flutter#196260) 2026-11-13 [email protected] Safely return null on malformed stack trace line in StackFrame.fromStackTraceLine (flutter/flutter#194673) 2026-11-13 [email protected] Clarify that super.dispose() must be called synchronously (flutter/flutter#193416) 2026-11-13 [email protected] Consolidate exit-code parameters on runCommand with ExpectedExit (flutter/flutter#196479) 2026-11-13 [email protected] Support multi-view apps in widget test binding (flutter/flutter#194480) 2026-11-13 [email protected] Document using a ListView inside a Column (flutter/flutter#195145) 2026-11-13 [email protected] Add didChangeAlwaysUse24HourFormat to WidgetsBinding and update MediaQuery (flutter/flutter#196117) 2026-11-13 [email protected] Build local engine wasm configs on 32-core Linux bots (flutter/flutter#196284) 2026-11-13 [email protected] [Android] Fix Hybrid Composition resize deadlock (flutter/flutter#196255) 2026-11-13 [email protected] Roll Skia from 11f46cfe8838 to e8ff7a4187ec (9 revisions) (flutter/flutter#196557) 2026-11-13 [email protected] [Impeller] Fix SurfaceContextVK submission tracking and double HostBuffer reset (flutter/flutter#196064) 2026-11-13 [email protected] Manual roll Packages from 14f9933 to 015df97 (5 revisions) (flutter/flutter#196558) 2026-11-13 [email protected] Remove routes_transition_test from widgets (flutter/flutter#186620) 2026-11-13 [email protected] [flutter_tools] Replace TargetPlatform.simpleName with cpuArch (flutter/flutter#196264) 2026-11-13 [email protected] Add a deferred platform-view-created path to the shell and use it on Android (flutter/flutter#196342) 2026-11-13 [email protected] Optimize RenderSliverVariedExtentList and introduce protected itemExtentOf API in RenderSliverFixedExtentBoxAdaptor (flutter/flutter#192384) 2026-11-13 [email protected] Revert: [android]: prewarms shaders when the context is created (flutter/flutter#196468) If this roll has caused a breakage, revert this CL and set the roller to dry run mode using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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.
Forking #190985 because the original author has stopped responding.
Original description:
Compiler::CreateDepfileContentsandOutputBundleDepfilejoin dependency paths with plain spaces, so a path containing a space reaches the consumer as two paths that do not exist. An SDK under~/Library/Application Supportputs a space in front of every bundledshader_libinclude, which is why this shows up on macOS.Both writers now go through
EscapeDepfilePath. A space becomes\, with any run of backslashes in front of it doubled, since 2N+1 backslashes plus a space read back as N backslashes plus a space. Backslashes elsewhere are left as they are: that is the encoding Ninja, flutter_tools'DepfileServiceand the hooks runner'sparseDepFileInputsall read correctly.Escaping is covered by unit tests in
compiler_unittests.cc.Fixes #190968
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.