You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 wtypes header 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;
^
The text was updated successfully, but these errors were encountered:
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. Unfortunatelysentry.h
's importwtypes
is problematic for two reasons:winnt.h
wtypes
header 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
Environment
Steps To Reproduce
Build swift-sentry.
Log output
The text was updated successfully, but these errors were encountered: