Skip to content

Conversation

@0xpablo
Copy link

@0xpablo 0xpablo commented Nov 16, 2025

Adding Direct2D to WinSDK. I tested the change locally and was able to use Direct2D types.

cc: @compnerd

Fixes #57723.

For more context, I was trying to create a shim to expose Direct2D to my Swift package but ran into this assertion (same thing that referenced issue):

  Assertion failed: !D->isUnconditionallyVisible() && "expected a hidden declaration", file C:\Users\swift-ci\jenkins\workspace\swift-6.2-windows-toolchain-arm64\llvm-project\clang\lib\Serialization\ASTWriter.cpp, line 7184
  Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
  Stack dump:
  0.      C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared\dxgitype.h:91:3: current parser token 'DXGI_MODE_DESC'

I tried with a variety of toolchains (all with assertions enabled) and they all presented the same issue. I figured that the issue could be related with that type already present in WinSDK, so I decided to try to add the Direct2D module to WinSDK and I got things working.

@0xpablo 0xpablo requested a review from a team as a code owner November 16, 2025 18:57
@kateinoigakukun
Copy link
Member

swiftlang/swift-docc#1352
@swift-ci please build toolchain Windows

@compnerd
Copy link
Member

@swift-ci please build toolchain Windows platform

@compnerd
Copy link
Member

@swift-ci please build toolchain Windows ARM64 platform

@compnerd
Copy link
Member

@swift-ci please test Windows platform

@compnerd
Copy link
Member

@swift-ci please build toolchain Windows ARM64 platform

@kateinoigakukun
Copy link
Member

@swift-ci please build toolchain Windows platform

@kateinoigakukun
Copy link
Member

@swift-ci please test Windows platform

@compnerd
Copy link
Member

@swift-ci please build toolchain Windows ARM64 platform

@compnerd
Copy link
Member

@swift-ci please smoke test Linux platform

@compnerd
Copy link
Member

@swift-ci please smoke test macOS platform

@compnerd
Copy link
Member

The ARM64 failure is weird - I think that it is picking up the wrong version of the script somehow 🤔 (CC: @shahmishal)

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.

[SR-15409] Assertion failure: "expected a hidden declaration" when building with certain C header includes on Windows.

3 participants