Skip to content

[TESTING] Add dual-backing FilePath (classic swift-system + SE-0529) - #383

Draft
milseman wants to merge 3 commits into
apple:mainfrom
milseman:filepath_bincompat
Draft

milseman wants to merge 3 commits into
apple:mainfrom
milseman:filepath_bincompat

Conversation

@milseman

Copy link
Copy Markdown
Contributor

For testing purposes, dynamically switch between "old" and "new" file path based on SPI or environment variable. This includes all the semantic changes such as significant-trailing-slash, proper Darwin Root parsing, canonicalization of interior .s, etc.


FilePath becomes a wrapper over two backings behind one unchanged public API:

  • Backings: _SwiftSystemFilePath (classic, default) and _StdlibFilePath (SE-0529)
  • Switch at runtime: _setFilePathSemanticMode(.legacy / .stdlibNew), or the _SWIFT_SYSTEM_NEW_FILEPATH env var
  • Per-backing dispatch for Root, ComponentView, and Component, so each era's own validator answers; all era logic lives in the wrapper
  • Codable _v2 archive-compat preserved
  • SE-0529 core gated at SwiftStdlib 9999, mapped to macOS 26 (26 floor)
  • Adds the SE-0529 standalone suite (StdlibFilePathTests)

Legacy mode passes swift-system's suite unchanged; SE-0529 mode produces the known semantic delta. Darwin-only.

FilePath becomes a wrapper over two backings behind one unchanged public API:

- Backings: _SwiftSystemFilePath (classic, default) and _StdlibFilePath (SE-0529)
- Switch at runtime: _setFilePathSemanticMode(.legacy / .stdlibNew), or the
  _SWIFT_SYSTEM_NEW_FILEPATH env var
- Per-backing dispatch for Root, ComponentView, and Component, so each era's own
  validator answers; all era logic lives in the wrapper
- Codable _v2 archive-compat preserved
- SE-0529 core gated at SwiftStdlib 9999, mapped to macOS 26 (26 floor)
- Adds the SE-0529 standalone suite (StdlibFilePathTests)

Legacy mode passes swift-system's suite unchanged; SE-0529 mode produces the known
semantic delta. Darwin-only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant