[flow] Fix Windows path separator mismatches in File_key and flowconfig expansion (#9402)#9402
Open
[flow] Fix Windows path separator mismatches in File_key and flowconfig expansion (#9402)#9402
Conversation
|
@panagosg7 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D102285839. |
meta-codesync Bot
pushed a commit
that referenced
this pull request
Apr 24, 2026
…ig expansion (#9402) Summary: Normalize directory separators to '/' in File_key suffixes at creation time (strip_project_root, lib_file_of_absolute) so that file keys are always '/'-based regardless of platform. This fixes the Graph.NodeNotFound crash when loading Linux-generated saved state on Windows, where '\'-based local file keys failed to match '/'-based saved state keys. Also normalize separators in expand_project_root_token_as_relative so that flowconfig directives like module.system.node.root_relative_dirname with <PROJECT_ROOT> prefixes produce '/'-based paths, matching the now-normalized File_key suffixes. Without this, Files.is_prefix would append '\' on Windows while suffixes use '/', breaking root-relative module resolution. Fix Files.is_prefix to append '/' instead of Filename.dir_sep when the prefix lacks a trailing separator. Previously, is_prefix would append '\' on Windows, which failed to match the now '/'-based File_key suffixes — breaking scoped root-relative module resolution (e.g., the `config_module_system_node_root_relative_dirnames` test). Both normalizations are no-ops on Unix. Changelog: [internal] Differential Revision: D102285839
f709109 to
20799ad
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
Apr 25, 2026
…ig expansion (#9402) Summary: Normalize directory separators to '/' in File_key suffixes at creation time (strip_project_root, lib_file_of_absolute) so that file keys are always '/'-based regardless of platform. This fixes the Graph.NodeNotFound crash when loading Linux-generated saved state on Windows, where '\'-based local file keys failed to match '/'-based saved state keys. Also normalize separators in expand_project_root_token_as_relative so that flowconfig directives like module.system.node.root_relative_dirname with <PROJECT_ROOT> prefixes produce '/'-based paths, matching the now-normalized File_key suffixes. Without this, Files.is_prefix would append '\' on Windows while suffixes use '/', breaking root-relative module resolution. Fix Files.is_prefix to append '/' instead of Filename.dir_sep when the prefix lacks a trailing separator. Previously, is_prefix would append '\' on Windows, which failed to match the now '/'-based File_key suffixes — breaking scoped root-relative module resolution (e.g., the `config_module_system_node_root_relative_dirnames` test). Both normalizations are no-ops on Unix. Changelog: [internal] Differential Revision: D102285839
20799ad to
98d520e
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
Apr 25, 2026
…ig expansion (#9402) Summary: Normalize directory separators to '/' in File_key suffixes at creation time (strip_project_root, lib_file_of_absolute) so that file keys are always '/'-based regardless of platform. This fixes the Graph.NodeNotFound crash when loading Linux-generated saved state on Windows, where '\'-based local file keys failed to match '/'-based saved state keys. Also normalize separators in expand_project_root_token_as_relative so that flowconfig directives like module.system.node.root_relative_dirname with <PROJECT_ROOT> prefixes produce '/'-based paths, matching the now-normalized File_key suffixes. Without this, Files.is_prefix would append '\' on Windows while suffixes use '/', breaking root-relative module resolution. Fix Files.is_prefix to append '/' instead of Filename.dir_sep when the prefix lacks a trailing separator. Previously, is_prefix would append '\' on Windows, which failed to match the now '/'-based File_key suffixes — breaking scoped root-relative module resolution (e.g., the `config_module_system_node_root_relative_dirnames` test). Both normalizations are no-ops on Unix. Changelog: [internal] Differential Revision: D102285839
98d520e to
4e067c0
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
Apr 25, 2026
…ig expansion (#9402) Summary: Normalize directory separators to '/' in File_key suffixes at creation time (strip_project_root, lib_file_of_absolute) so that file keys are always '/'-based regardless of platform. This fixes the Graph.NodeNotFound crash when loading Linux-generated saved state on Windows, where '\'-based local file keys failed to match '/'-based saved state keys. Also normalize separators in expand_project_root_token_as_relative so that flowconfig directives like module.system.node.root_relative_dirname with <PROJECT_ROOT> prefixes produce '/'-based paths, matching the now-normalized File_key suffixes. Without this, Files.is_prefix would append '\' on Windows while suffixes use '/', breaking root-relative module resolution. Fix Files.is_prefix to append '/' instead of Filename.dir_sep when the prefix lacks a trailing separator. Previously, is_prefix would append '\' on Windows, which failed to match the now '/'-based File_key suffixes — breaking scoped root-relative module resolution (e.g., the `config_module_system_node_root_relative_dirnames` test). Both normalizations are no-ops on Unix. Changelog: [internal] Differential Revision: D102285839
4e067c0 to
07c9699
Compare
…ig expansion (#9402) Summary: Normalize directory separators to '/' in File_key suffixes at creation time (strip_project_root, lib_file_of_absolute) so that file keys are always '/'-based regardless of platform. This fixes the Graph.NodeNotFound crash when loading Linux-generated saved state on Windows, where '\'-based local file keys failed to match '/'-based saved state keys. Also normalize separators in expand_project_root_token_as_relative so that flowconfig directives like module.system.node.root_relative_dirname with <PROJECT_ROOT> prefixes produce '/'-based paths, matching the now-normalized File_key suffixes. Without this, Files.is_prefix would append '\' on Windows while suffixes use '/', breaking root-relative module resolution. Fix Files.is_prefix to append '/' instead of Filename.dir_sep when the prefix lacks a trailing separator. Previously, is_prefix would append '\' on Windows, which failed to match the now '/'-based File_key suffixes — breaking scoped root-relative module resolution (e.g., the `config_module_system_node_root_relative_dirnames` test). Both normalizations are no-ops on Unix. Changelog: [internal] Differential Revision: D102285839
07c9699 to
90f0cb7
Compare
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.
Summary:
Normalize directory separators to '/' in File_key suffixes at creation time (strip_project_root, lib_file_of_absolute) so that file keys are always '/'-based regardless of platform. This fixes the Graph.NodeNotFound crash when loading Linux-generated saved state on Windows, where ''-based local file keys failed to match '/'-based saved state keys.
Also normalize separators in expand_project_root_token_as_relative so that flowconfig directives like module.system.node.root_relative_dirname with <PROJECT_ROOT> prefixes produce '/'-based paths, matching the now-normalized File_key suffixes. Without this, Files.is_prefix would append '' on Windows while suffixes use '/', breaking root-relative module resolution.
Fix Files.is_prefix to append '/' instead of Filename.dir_sep when the prefix lacks a trailing separator. Previously, is_prefix would append '' on Windows, which failed to match the now '/'-based File_key suffixes — breaking scoped root-relative module resolution (e.g., the
config_module_system_node_root_relative_dirnamestest).Both normalizations are no-ops on Unix.
Changelog: [internal]
Differential Revision: D102285839