Skip to content

Support file system synchronized group membership exceptions#89

Merged
mikeger merged 4 commits into
mikeger:mainfrom
Econa77:feature/support-file-system-synchronized-exceptions
Jun 9, 2026
Merged

Support file system synchronized group membership exceptions#89
mikeger merged 4 commits into
mikeger:mainfrom
Econa77:feature/support-file-system-synchronized-exceptions

Conversation

@Econa77

@Econa77 Econa77 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

This follows up on #48.

Summary

  • Excludes files listed in PBXFileSystemSynchronizedBuildFileExceptionSet.membershipExceptions
  • Restricts fileSystemSynchronizedGroupsFiles to recursive file paths
  • Keeps synchronized group directories out of target folder matching

Notes

The previous synchronized group support used recursiveChildren() and treated the returned paths as target inputs. Since recursiveChildren() also returns directories, those directories could be registered as folder dependencies. That was not intended: synchronized group handling here should track files, not make every intermediate folder affect the target.

@mikeger

mikeger commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Thanks for the contribution @Econa77 !

Can you check if the folders exclusion works as expected? I suspect it might not be the case.

    @Test
    func projectDeepFolderMembershipExceptionFolderChange() async throws {
        // given
        let testTool = try IntegrationTestTool()
        defer { try? testTool.tearDown() }

        let tool = try testTool.createSUT(config: nil,
                                          basePath: "ExampleProject.xcodeproj")

        // when
        try testTool.changeFile(at: testTool.projectPath + "ExampleProject/DeepFolder/Path/ExcludedFolder/ExcludedFolderView.swift")

        // then
        let result = try await tool.run()
        #expect(result == Set<TargetIdentity>())
    }

where the fixture has ExcludedFolder as excluded.

If you prefer, I can do the change to support folders.

@Econa77

Econa77 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@mikeger Thanks, you were right.

The previous logic only handled exact path matches, so folder membership exceptions did not exclude files under that folder. I updated it to exclude both the exception path itself and descendants of that path 👍

@mikeger mikeger merged commit fe3c9e9 into mikeger:main Jun 9, 2026
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants