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

Platform filters are not taken into account when diffing projects #130

Closed
kwridan opened this issue Nov 6, 2023 · 0 comments · Fixed by #132
Closed

Platform filters are not taken into account when diffing projects #130

kwridan opened this issue Nov 6, 2023 · 0 comments · Fixed by #132
Labels
bug Something isn't working

Comments

@kwridan
Copy link
Contributor

kwridan commented Nov 6, 2023

Describe the bug
For multi platform projects, platform filters can be used to specify if certain files or linked frameworks should be applicable to certain platforms (for example ARKit isn't supported on tvOS).

To Reproduce

  • Create a multi-platform app (i.e. one with multiple destinations, e.g. iPhone, iPad and Apple TV)
  • Link against ARKit
  • Apply a platform filter for iOS only
  • Duplicate the project
  • Change the platform filter to permit any platform
  • Run xcdiff against both projects
  • Notice: no diffs are flagged

Expected behavior
A diff should be flagged for any mismatching attributes.

Screenshots
Screenshot 2023-11-06 at 11 04 32

Additional context

  • platform filters can also be applied to other build files (e.g. source files)
@kwridan kwridan added the bug Something isn't working label Nov 6, 2023
@kwridan kwridan changed the title Platform Filters are not taken into account when diffing projects Platform filters are not taken into account when diffing projects Nov 6, 2023
kwridan added a commit to kwridan/xcdiff that referenced this issue Dec 15, 2023
resolves: bloomberg#130

- Multiple platform filters can now be applied to build files in Xcode
- This includes most build files available in the various build phases (e.g. sources, resources, headers, linked,  etc...)
- A build file diff helper was introduced to allow adding the platform diff to the the existing comparators
- Tests and fixtures were updated to account for multiple platform filters

Test Plan:

- Run xcdiff against the new fixtures, inspect and verify the results

```sh
swift run xcdiff -p1 Fixtures/app_with_platform_filters_1/AppWithPlatformFilters.xcodeproj -p2 Fixtures/app_with_platform_filters_2/AppWithPlatformFilters.xcodeproj -v
```

Signed-off-by: Kassem Wridan <[email protected]>
kwridan added a commit to kwridan/xcdiff that referenced this issue Dec 15, 2023
resolves: bloomberg#130

- Multiple platform filters can now be applied to build files in Xcode
- This includes most build files available in the various build phases (e.g. sources, resources, headers, linked,  etc...)
- A build file diff helper was introduced to allow adding the platform diff to the the existing comparators
- Tests and fixtures were updated to account for multiple platform filters

Test Plan:

- Run xcdiff against the new fixtures, inspect and verify the results

```sh
swift run xcdiff -p1 Fixtures/app_with_platform_filters_1/AppWithPlatformFilters.xcodeproj -p2 Fixtures/app_with_platform_filters_2/AppWithPlatformFilters.xcodeproj -v
```

Signed-off-by: Kassem Wridan <[email protected]>
kwridan added a commit to kwridan/xcdiff that referenced this issue Jan 15, 2024
resolves: bloomberg#130

- Multiple platform filters can now be applied to build files in Xcode
- This includes most build files available in the various build phases (e.g. sources, resources, headers, linked,  etc...)
- A build file diff helper was introduced to allow adding the platform diff to the the existing comparators
- Tests and fixtures were updated to account for multiple platform filters

Test Plan:

- Run xcdiff against the new fixtures, inspect and verify the results

```sh
swift run xcdiff -p1 Fixtures/app_with_platform_filters_1/AppWithPlatformFilters.xcodeproj -p2 Fixtures/app_with_platform_filters_2/AppWithPlatformFilters.xcodeproj -v
```

Signed-off-by: Kassem Wridan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant