Skip to content

Generated typealiases missing public access modifier #262

@ktraunmueller

Description

@ktraunmueller

When I run the generate-all.ps1 script in my winrt-monorepo (which is basically a copy of the original TBC winui repos, with the build migrated to CMake), two typealiases are generated with default/internal access, but they need to be public for the libraries to compile.

Here's the two declarations, as generated:

in swift-uwp\Sources\UWP\Generated\Windows.System+ABI.swift

typealias DispatcherQueueHandlerWrapper = InterfaceWrapperBase<__IMPL_Windows_System.DispatcherQueueHandlerBridge>

in swift-windowsappsdk\Sources\WinAppSDK\Generated\Microsoft.UI.Dispatching+ABI.swift

typealias DispatcherQueueHandlerWrapper = InterfaceWrapperBase<__IMPL_Microsoft_UI_Dispatching.DispatcherQueueHandlerBridge>

Adding public in front of the typealias fixes the problem.

I am using swift-winrt 0.6.0 against Windows App SDK 1.7.

Example projections.json

{
  "swift-winrt": "0.6.0",
  "project": "WinUI",
  "package": {
    "id": "Microsoft.WindowsAppSDK",
    "version": "1.7.250606001"
  },
  "dependencies": [
    {
      "id": "Microsoft.Windows.SDK.Contracts",
      "version": "10.0.18362.2005"
    }
  ],

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions