Skip to content

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

Merged
JDevlieghere merged 1 commit into
swiftlang:stable/21.xfrom
charles-zablit:cz/lldb/windows/re-enable-tests
Jul 1, 2026
Merged

JDevlieghere merged 1 commit into
swiftlang:stable/21.xfrom
charles-zablit:cz/lldb/windows/re-enable-tests

Conversation

@charles-zablit

@charles-zablit charles-zablit commented Jun 15, 2026 •

Copy link
Copy Markdown

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.

@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

@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

    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.
@charles-zablit
charles-zablit force-pushed the cz/lldb/windows/re-enable-tests branch from 15f3071 to 57ae987 Compare July 1, 2026 13:04
@charles-zablit

Copy link
Copy Markdown
Author

swiftlang/swift#90324

@swift-ci please test

@JDevlieghere
JDevlieghere merged commit 2e2a362 into swiftlang:stable/21.x Jul 1, 2026
3 checks passed
@finagolfin

Copy link
Copy Markdown
Member

This appears to have broken the Windows CI:

Failed Tests (18):
  lldb-api :: lang/swift/async/actors/unprioritised_jobs/TestSwiftActorUnprioritisedJobs.py
  lldb-api :: lang/swift/async/continuations/TestSwiftContinuationSynthetic.py
  lldb-api :: lang/swift/async/expr/TestSwiftAsyncExpressions.py
  lldb-api :: lang/swift/async/formatters/task/TestSwiftTaskSyntheticProvider.py
  lldb-api :: lang/swift/async/formatters/task/complete/TestSwiftTaskComplete.py
  lldb-api :: lang/swift/async/formatters/task/suspended/TestSwiftTaskSuspended.py
  lldb-api :: lang/swift/async/formatters/taskpriority/TestSwiftTaskPrioritySummary.py
  lldb-api :: lang/swift/async/taskgroups/TestSwiftTaskGroupSynthetic.py
  lldb-api :: lang/swift/closures_var_not_captured/TestSwiftClosureVarNotCaptured.py
  lldb-api :: lang/swift/expression/actor/TestSwiftExpressionActor.py
  lldb-api :: lang/swift/foundation_value_types/data/TestSwiftFoundationTypeData.py
  lldb-api :: lang/swift/foundation_value_types/date/TestSwiftFoundationTypeDate.py
  lldb-api :: lang/swift/foundation_value_types/uuid/TestSwiftFoundationTypeUUID.py
  lldb-api :: lang/swift/observation/TestSwiftObservation.py
  lldb-api :: lang/swift/po/recursive/TestSwiftPORecursiveBehavior.py
  lldb-api :: lang/swift/po/ref_types/TestSwiftPORefTypes.py
  lldb-api :: lang/swift/po/val_types/TestSwiftPOValTypes.py
  lldb-api :: lang/swift/variables/consume_operator_async/TestSwiftConsumeOperatorAsync.py

@finagolfin

Copy link
Copy Markdown
Member

Will it be fixed by swiftlang/swift#90324?

@charles-zablit

Copy link
Copy Markdown
Author

Will it be fixed by swiftlang/swift#90324?

Yes, there was a delay between the 2 PRs being merged.

@finagolfin

Copy link
Copy Markdown
Member

Yep, those tests are passing again now. 👍

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.

3 participants