Skip to content

[lldb] Enable Swift Foundation value-type formatters on Windows#13212

Open
charles-zablit wants to merge 2 commits into
swiftlang:stable/21.xfrom
charles-zablit:cz/lldb/windows/re-enable-tests
Open

[lldb] Enable Swift Foundation value-type formatters on Windows#13212
charles-zablit wants to merge 2 commits into
swiftlang:stable/21.xfrom
charles-zablit:cz/lldb/windows/re-enable-tests

Conversation

@charles-zablit

Copy link
Copy Markdown

(cherry picked from commit 2296100)Three things blocked the Foundation value-type tests on Windows:

  1. The test inferiors could not launch: they depend on the Swift runtime DLLs
    (Foundation, FoundationEssentials, swiftCore, ...), which are not on the
    inferior's PATH. Windows has no rpath, so add the SDK's usr/bin (taken from
    the test --sysroot) to the inferior PATH in the API test lit config.

  2. The Data and UUID summary providers were registered for the exact type name
    'Foundation.X' and so did not match the 'FoundationEssentials.X' types used
    on Windows. Register them by regex, like Date and URL already are.

  3. The Data summary provider only understood the legacy _Representation enum.
    swift-foundation uses a struct (_storage: __DataStorage, _slice: Range)
    whose byte count is the size of _slice. Read _slice's raw bytes (its
    synthetic child provider is unreliable on Windows) and compute the count.

Re-enables foundation_value_types/{data,date,uuid} on Windows. Decimal (summary
provider needs the FoundationEssentials layout) and URL (swiftCore metadata
errors) need more work and stay disabled.

(cherry picked from commit ffb559b)

@charles-zablit charles-zablit requested a review from a team as a code owner June 15, 2026 17:17
@charles-zablit

Copy link
Copy Markdown
Author

@swift-ci please test

@charles-zablit

Copy link
Copy Markdown
Author

swiftlang/swift#89967

@swift-ci please test windows

@charles-zablit

Copy link
Copy Markdown
Author

@swift-ci please test macos

Three things blocked the Foundation value-type tests on Windows:

1. The test inferiors could not launch: they depend on the Swift runtime DLLs
   (Foundation, FoundationEssentials, swiftCore, ...), which are not on the
   inferior's PATH. Windows has no rpath, so add the SDK's usr/bin (taken from
   the test --sysroot) to the inferior PATH in the API test lit config.

2. The Data and UUID summary providers were registered for the exact type name
   'Foundation.X' and so did not match the 'FoundationEssentials.X' types used
   on Windows. Register them by regex, like Date and URL already are.

3. The Data summary provider only understood the legacy _Representation enum.
   swift-foundation uses a struct (_storage: __DataStorage, _slice: Range<Int>)
   whose byte count is the size of _slice. Read _slice's raw bytes (its
   synthetic child provider is unreliable on Windows) and compute the count.

Re-enables foundation_value_types/{data,date,uuid} on Windows. Decimal (summary
provider needs the FoundationEssentials layout) and URL (swiftCore metadata
errors) need more work and stay disabled.

(cherry picked from commit ffb559b)
These lang/swift/explicit_modules tests (simple, implicit_fallback,
private_type_generic) pass on Windows with the current toolchain, so
remove their @skipIfWindows decorators.

(cherry picked from commit af6bb99)
@charles-zablit charles-zablit force-pushed the cz/lldb/windows/re-enable-tests branch from b5e6e26 to 15f3071 Compare June 18, 2026 15:23
@charles-zablit

Copy link
Copy Markdown
Author

swiftlang/swift#90051

@swift-ci please test windows

@charles-zablit

Copy link
Copy Markdown
Author

swiftlang/swift#90158

@swift-ci please test windows

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