Hive Hive
Sign in

tuist build –generate causes linting issues as of 4.38.0

GitHub issue · Open

Metadata
Source
tuist/tuist #7219
Updated
Jun 11, 2026
Domains
Generated projects
Details

What happened?

I have a project that has a bunch of firebase dependencies, and as of 4.38.0, running tuist build --generate generates a bunch of issues (listed in the error log)

Running tuist build does not have the same issue, and I can confirm that going down to 4.37.0 does not have the same issue.

How do we reproduce it?

Have firebase-ios-sdk as a dependency, and run tuist build --generate.

Error log

Target GoogleAppMeasurementTarget which depends on nanopb does not support the required platforms: watchos, tvos, macos, visionos. The dependency on nanopb must have a dependency condition constraining to at most: ios.
Target GoogleAppMeasurementTarget which depends on GoogleUtilities-NSData does not support the required platforms: watchos, macos, visionos, tvos. The dependency on GoogleUtilities-NSData must have a dependency condition constraining to at most: ios.
Target GoogleUtilities-Network which depends on GoogleUtilities-NSData does not support the required platforms: visionos, watchos, macos, tvos. The dependency on GoogleUtilities-NSData must have a dependency condition constraining to at most: ios.
Target GoogleUtilities-Network which depends on GoogleUtilities-Logger does not support the required platforms: macos, watchos, visionos, tvos. The dependency on GoogleUtilities-Logger must have a dependency condition constraining to at most: ios.
Target FirebaseDatabase which depends on FirebaseSharedSwift does not support the required platforms: watchos, tvos, macos, visionos. The dependency on FirebaseSharedSwift must have a dependency condition constraining to at most: ios.
Target FirebaseMessaging which depends on FirebaseInstallations does not support the required platforms: watchos, macos, visionos, tvos. The dependency on FirebaseInstallations must have a dependency condition constraining to at most: ios.
Target FirebaseMessaging which depends on GoogleUtilities-Environment does not support the required platforms: watchos, tvos, macos, visionos. The dependency on GoogleUtilities-Environment must have a dependency condition constraining to at most: ios.
Target FirebaseMessaging which depends on GoogleDataTransport does not support the required platforms: visionos, macos, tvos, watchos. The dependency on GoogleDataTransport must have a dependency condition constraining to at most: ios.
Target FirebaseMessaging which depends on GoogleUtilities-UserDefaults does not support the required platforms: visionos, macos, tvos, watchos. The dependency on GoogleUtilities-UserDefaults must have a dependency condition constraining to at most: ios.
Target FirebaseMessaging which depends on FirebaseCore does not support the required platforms: watchos, tvos, macos, visionos. The dependency on FirebaseCore must have a dependency condition constraining to at most: ios.
Target FirebaseMessaging which depends on nanopb does not support the required platforms: visionos, macos, tvos, watchos. The dependency on nanopb must have a dependency condition constraining to at most: ios.
Target AppCheckCore which depends on GoogleUtilities-Environment does not support the required platforms: watchos, tvos, macos, visionos. The dependency on GoogleUtilities-Environment must have a dependency condition constraining to at most: ios.
Target AppCheckCore which depends on FBLPromises does not support the required platforms: visionos, macos, tvos, watchos. The dependency on FBLPromises must have a dependency condition constraining to at most: ios.
Target AppCheckCore which depends on GoogleUtilities-UserDefaults does not support the required platforms: watchos, macos, visionos, tvos. The dependency on GoogleUtilities-UserDefaults must have a dependency condition constraining to at most: ios.
Target FirebaseAppCheck which depends on FirebaseCore does not support the required platforms: watchos, macos, visionos, tvos. The dependency on FirebaseCore must have a dependency condition constraining to at most: ios.
Target FirebaseAppCheck which depends on GoogleUtilities-Environment does not support the required platforms: visionos, macos, tvos, watchos. The dependency on GoogleUtilities-Environment must have a dependency condition constraining to at most: ios.
Target FirebaseAppCheck which depends on GoogleUtilities-UserDefaults does not support the required platforms: watchos, tvos, macos, visionos. The dependency on GoogleUtilities-UserDefaults must have a dependency condition constraining to at most: ios.
Fatal linting issues found

macOS version

15.1.1

Tuist version

4.38.2

Xcode version

16.1

Comments
D
dosubot[bot] Jan 3, 2025

Hey @lilidotshi! I’m here to assist with any bugs, questions, or becoming a contributor. Let’s squash those bugs together! 🐛

The issues you’re encountering with tuist build --generate in version 4.38.0 are related to platform constraints for dependencies. In this version, Tuist introduced stricter linting checks for platform support, which means that dependencies must explicitly declare the platforms they support. This is why you’re seeing errors indicating that certain dependencies do not support platforms like watchOS, tvOS, macOS, and visionOS, and need to be constrained to iOS.

To resolve these issues, you need to update your project’s dependency configurations to include platform constraints. For each dependency that is causing an error, specify the platforms it supports using the condition option. Here’s an example of how you can define a dependency with platform constraints:

dependencies: [
.external(name: "Firebase", condition: .when(platforms: [.iOS])),
]

This ensures that the dependency is only linked when building for iOS, which should resolve the linting issues you’re experiencing. You will need to apply similar constraints to all the dependencies listed in the error log.

These changes are necessary due to the updates in Tuist 4.38.0, which enforce stricter platform checks to ensure compatibility and prevent runtime issues [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

L
lilidotshi Jan 3, 2025

The solution above doesn’t work if there are deps within the deps (like the errors say, it seems to be a problem with firebase’s dependencies on other libraries)

L
lilidotshi Jan 3, 2025

Interestingly, running tuist build (no –generate flag) locally works fine, but once I run tuist build as part of a github runner workflow (what we use for CI), it fails with the same error.

running tuist generate followed by tuist build does NOT produce the error in CI. It seems to be related to generation in conjunction with tuist build

H
Hais Jun 3, 2025

This appears to be still an issue as of 4.50.1

P
pepicrft Jun 11, 2025

Hey 👋🏼 Would you mind sharing a small reproducible project?

D
dosubot[bot] Jun 27, 2026

Hi, @lilidotshi. I’m Dosu, and I’m helping the tuist team manage their backlog and am marking this issue as stale.

Issue Summary

  • tuist build --generate started failing in Tuist 4.38.0 with platform-compatibility/lint errors tied to Firebase-related dependencies.
  • Adding a platform condition on the top-level dependency did not resolve the problem, which appears to originate from transitive Firebase dependencies.
  • You noted an environment-specific difference: tuist build works locally but fails in GitHub Actions, while tuist generate followed by tuist build succeeds in CI.
  • @Hais confirmed the issue still reproduces in 4.50.1, and @pepicrft requested a small reproducible project to continue investigating.

Next Steps

  • Please let us know if this is still relevant on the latest version of Tuist; if it is, you can keep the discussion open by commenting here.
  • Otherwise, this issue will be automatically closed in 7 days.

Thanks for your understanding and contribution.