Skip to content

[Impeller] impellerc writes depfile paths unescaped, breaking consumers when a path contains a space #190968

Closed

Description

@bdero

Steps to reproduce

  1. Place a Flutter SDK (or any include on the shader search path) under a directory whose path contains a space, for example ~/Library/Application Support/sdks/flutter.
  2. Compile any shader with impellerc --depfile=out.d ... whose includes resolve into that path (the bundled shader_lib does, since it lives next to the compiler inside the SDK).
  3. Inspect out.d.

Expected results

Paths containing spaces are escaped per the depfile syntax the file claims to follow (\ , as in Ninja's depfile parser, which the implementation cites), so a conforming parser recovers the original paths.

Actual results

Compiler::CreateDepfileContents (impeller/compiler/compiler.cc) joins dependency paths with plain spaces and no escaping:

out.sl: /Users/me/Library/Application Support/sdks/flutter/bin/cache/artifacts/engine/darwin-x64/shader_lib/impeller/constants.glsl ...

A parser splitting on whitespace recovers /Users/me/Library/Application and Support/sdks/.../constants.glsl, neither of which exists. Downstream, build hooks that feed these paths to the native-assets dependency tracker end up declaring nonexistent dependencies, which currently defeats hook caching entirely (the hook re-runs on every build, dart-lang/native#3541). The comment above the function links Ninja's depfile parser, which unescapes \ , \#, and \\; escaping those in the writer matches the cited grammar.

Application Support makes this common on macOS for any tool that manages SDK checkouts under the user's application-data directory.

Flutter Doctor output

Doctor output
[!] Flutter (Channel [user-branch], 3.47.0-1.0.pre-283, on macOS 15.5 24F74 darwin-arm64, locale en-US)
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c853e24957 (2026-07-29)
    • Engine revision 1e927971a0
    • Dart version 3.14.0 (build 3.14.0-76.0.dev)
    • DevTools version 2.60.0

Activity

  1. added
    engine
    e: impeller
    on Aug 11, 2026
  2. added
    in triage
    team-engine
    and removed
    in triage
    on Aug 12, 2026
  3. added
    P1
    on Aug 17, 2026
  4. added
    triaged-engine
    on Aug 17, 2026
  5. b-luk commented on Aug 18, 2026

    @b-luk
    Contributor

    Hi @wilyan09007. I see you have a draft PR for fixing this issue. Are you planning on getting this reviewed and merged?

  6. wilyan09007 commented on Aug 23, 2026

    @wilyan09007
    Contributor

    Yes, I just marked #190985 ready for review. Thanks for following up.

  7. added a commit that references this issue on Nov 14, 2026
    0023d76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1e: impellerengineteam-enginetriaged-engine

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions