Skip to content

impellerc cannot open input file in parent or sibling directories on windows #102805

@jonahwilliams

Description

@jonahwilliams

Given the following invocation of impellerc on windows:

C:\Users\Jonah\engine\src\out\host_debug_unopt\impellerc.exe --flutter-spirv --input=..\..\packages\flutter\lib\src\material\shaders\ink_sparkle.frag --spirv=foo

this uses the current directory to look up the provided file path, see

https://github.com/flutter/engine/blob/89a30a729302ec3c4b4d19df79c2d970a2d742cd/impeller/compiler/impellerc_main.cc#L36

and

https://github.com/flutter/engine/blob/89a30a729302ec3c4b4d19df79c2d970a2d742cd/fml/platform/win/file_win.cc#L161

With the above invocation this will end up creating a path like:

\\?\C:\Users\Jonah\flutter\examples\hello_world\..\..\packages\flutter\lib\src\material\shaders\ink_sparkle.frag

I don't think the windows utilities were ever tested for opening files that aren't contained with an application directory bundle. If instead the input file is copied to the current directory, then everything works until we hit the next bug:

 C:\Users\Jonah\engine\src\out\host_debug_unopt\impellerc.exe --flutter-spirv --input=ink_sparkle.frag --spirv=foo
ink_sparkle.frag

[ERROR:flutter/fml/platform/win/file_win.cc(446)] Could not replace temp file at correct path. File path: \\?\C:\Users\Jonah\flutter\examples\hello_world\foo. Temp file path: \\?\C:\Users\Jonah\flutter\examples\hello_world\foo.temp The process cannot access the file because it is being used by another process.
 (32).
Could not write file to foo

FYI @zanderso

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work liste: impellerImpeller rendering backend issues and features requestsplatform-windowsBuilding on or for Windows specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions