-
-
Notifications
You must be signed in to change notification settings - Fork 201
Closed
Description
Description
https://github.com/thebrowsercompany/swift-sentry is a Swift wrapper for the native SDK for Sentry. It uses Swift's embedded clang to import sentry.h, by importing it as a Clang module. Clang modules rely on modularized headers, i.e. the header must be self contained, and it must import all header dependencies. Unfortunately sentry.h's import wtypes is problematic for two reasons:
- it's incomplete, it uses APIs from other headers like
winnt.h - the
wtypesheader is not modularized as a standalone module in the Windows SDK.
This causes a Swift build error with Swift-5.10 or Swift main snapshot. The error is shown below.
When does the problem happen
- During build
Environment
- OS: Windows 11, 64-bit
- Compiler: Swift 5.10 snapshot
- SDK: Windows 10 SDK (10.0.20348.0)
Steps To Reproduce
Build swift-sentry.
Log output
......\build\debug\_deps\swiftsentry-src\Sources\sentry\include/SentryApp.h:6:10: note: in file included from ......\build\debug\_deps\swiftsentry-src\Sources\sentry\include/SentryApp.h:6:
#include <sentry.h>
^
......\build\debug\NugetPackages\io.sentry.sentry-native.crashpad.windows.amd64.0.0.0-ede193b\include\sentry.h:93:14: note: in file included from ......\build\debug\NugetPackages\io.sentry.sentry-native.crashpad.windows.amd64.0.0.0-ede193b\include\sentry.h:93:
# include <wtypes.h>
^
C:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\shared\wtypes.h:323:15: error: missing '#include <windef.h>'; 'RECTL' must be declared before it is used
typedef const RECTL *LPCRECTL;
^
C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\shared\windef.h:170:3: note: declaration here is not visible
} RECTL, *PRECTL, *LPRECTL;
^
Reactions are currently unavailable
Metadata
Metadata
Assignees
Projects
Status
No status