Skip to content

Comments

feat(cli): Add platformFilters for buildable folder exceptions#9545

Merged
fortmarek merged 1 commit intomainfrom
feat/build-groups-platforms
Feb 20, 2026
Merged

feat(cli): Add platformFilters for buildable folder exceptions#9545
fortmarek merged 1 commit intomainfrom
feat/build-groups-platforms

Conversation

@fortmarek
Copy link
Member

Summary

  • Add platformFilters parameter to BuildableFolderException.exception() in ProjectDescription
  • Map platform conditions through the manifest mapper to XcodeGraph model
  • Generate platformFiltersByRelativePath on PBXFileSystemSynchronizedBuildFileExceptionSet in the target generator
  • Update the generated_app_with_buildable_folders example to demonstrate usage with iOS + tvOS platform-specific resources

Usage

.folder("App/Resources", exceptions: .exceptions([
    .exception(platformFilters: [
        "PlatformSpecific/ios_only.json": .when([.ios])!,
        "PlatformSpecific/tvos_only.json": .when([.tvos])!,
    ]),
]))

Dependencies

Test plan

  • TargetGeneratorTests.generateTarget_synchronizedGroups updated and passing
  • BuildableFolderExceptionManifestMapperTests.test_from updated and passing
  • E2E: built tuist from source, ran tuist generate on updated example, verified platformFiltersByRelativePath appears correctly in generated project.pbxproj

🤖 Generated with Claude Code

@fortmarek fortmarek force-pushed the feat/build-groups-platforms branch 2 times, most recently from 77faec8 to faf1a2a Compare February 20, 2026 10:49
@fortmarek fortmarek marked this pull request as ready for review February 20, 2026 10:53
@fortmarek fortmarek requested a review from pepicrft February 20, 2026 10:53
@dosubot dosubot bot added the size:M For issues that take a handful of hours to implement label Feb 20, 2026
@dosubot dosubot bot added the type:enhancement New feature or request label Feb 20, 2026
@dosubot
Copy link

dosubot bot commented Feb 20, 2026

Related Documentation

Checked 1 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 20, 2026
@tuist
Copy link

tuist bot commented Feb 20, 2026

🛠️ Tuist Run Report 🛠️

Previews 📦

App Commit Open on device
Tuist 9d374a725

Tests 🧪

Scheme Status Cache hit rate Tests Skipped Ran Commit
TuistApp 66 % 21 0 21 9d374a725
TuistAutomationAcceptanceTests ⏭️ 0 % 0 0 0 cd3ccd7a8
TuistCacheEEAcceptanceTests 65 % 14 0 14 9d374a725
TuistCacheEEUnitTests 65 % 121 0 121 9d374a725
TuistDependenciesAcceptanceTests ⏭️ 0 % 0 0 0 cd3ccd7a8
TuistGeneratorAcceptanceTests ⏭️ 0 % 0 0 0 cd3ccd7a8
TuistKitAcceptanceTests ⏭️ 0 % 0 0 0 cd3ccd7a8
TuistUnitTests 66 % 2299 0 2299 9d374a725

Builds 🔨

Scheme Status Duration Commit
TuistApp 2m 19s 9d374a725
TuistAutomationAcceptanceTests 1m 28s 9d374a725
TuistCacheEEAcceptanceTests 57.3s 9d374a725
TuistCacheEEUnitTests 55.1s 9d374a725
TuistDependenciesAcceptanceTests 3m 19s 9d374a725
TuistGeneratorAcceptanceTests 2m 38s 9d374a725
TuistKitAcceptanceTests 5m 15s 9d374a725
TuistUnitTests 1m 51s 9d374a725

Bundles 🧰

Bundle Commit Install size Download size
Tuist 9d374a725
26.9 MB
Δ -1.2 MB (-4.16%)
14.6 MB
Δ -420.6 KB (-2.80%)

Allow specifying per-file platform conditions on buildable folder
exceptions, enabling multi-platform targets with platform-specific
resources in the same folder (e.g. iOS-only and tvOS-only resources).

The new `platformFilters` parameter on `.exception()` maps relative
file paths to `PlatformCondition` values, which are serialized as
`platformFiltersByRelativePath` on the Xcode project's
`PBXFileSystemSynchronizedBuildFileExceptionSet`.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@fortmarek fortmarek force-pushed the feat/build-groups-platforms branch from faf1a2a to 8e8fd45 Compare February 20, 2026 11:44
@fortmarek fortmarek merged commit 10f9b61 into main Feb 20, 2026
25 of 26 checks passed
@fortmarek fortmarek deleted the feat/build-groups-platforms branch February 20, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:M For issues that take a handful of hours to implement type:enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants