Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Previews broken when adding FluentUI through SPM #2050

Open
1 task
spelaez opened this issue Jun 22, 2024 · 1 comment
Open
1 task

Previews broken when adding FluentUI through SPM #2050

spelaez opened this issue Jun 22, 2024 · 1 comment

Comments

@spelaez
Copy link

spelaez commented Jun 22, 2024

Environment Information

  • Platform:
    • [x ] iOS
    • macOS
  • Package version(s): 0.28.0
  • Xcode and OS versions: Xcode 15.4 and Xcode 16 beta.

Please provide a reproduction of the bug:

  • Create a Swift Package
  • Add fluentUI as dependency in the Package.swift file
  • In the autogenerated swift file on the package, create a basic preview with any text
  • Try to run the preview

Actual behavior:

Previews can't run, with the following error

Xcode 16.0 Beta

== PREVIEW UPDATE ERROR:

    StubError
    
    StubError: could not generate preview info: unableToFindTarget

Xcode 15.4 fails, because even though the Package is specified as iOS only it tries to build the macOS version of Fluent, this however, seems to be a bug of Xcode 15.x

Expected behavior:

Adding FluentUI shouldn't break previews

Priorities and help requested:

Requested priority: Normal

Here's my Package.swift if it helps

// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
  name: "FluentTest",
  platforms: [.iOS(.v16)],
  products: [
    .library(
      name: "FluentTest",
      targets: ["FluentTest"]),
  ],
  dependencies: [
    .package(url: "https://github.com/microsoft/fluentui-apple.git", .upToNextMinor(from: "0.28.0"))
  ],
  targets: [
    .target(
      name: "FluentTest",
      dependencies: [
        .product(name: "FluentUI", package: "fluentui-apple")
      ]
    ),
    .testTarget(
      name: "FluentTestTests",
      dependencies: ["FluentTest"]
    )
  ]
)

@zjhch123
Copy link

same issue here

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

No branches or pull requests

2 participants