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

Fix Swift Macros unresolved by the Xcode editor #5851

Merged
merged 5 commits into from
Jan 30, 2024
Merged

Conversation

pepicrft
Copy link
Contributor

Short description 📝

Under some scenarios, for example when not using conventionally-named configurations, the Xcode editor failed to recognize the Swift Macros, even if the build system compiled them successfully. To fix it, I replaced the $BUILT_PRODUCTS_DIR, which is the directory where we copy the Swift Macros executables into, by $(BUILD_DIR)/$(CONFIGURATION), which represents the source macOS directory where executables are output by default.

I tested the changes with a project that contains Macros and configurations other than Debug and Release and the editor is able to resolve them successfully.

How to test the changes locally 🧐

You can take a project with Swift Macros, for example fixtures/framework_with_native_swift_macro, change the configuration names, and try to edit the Framework.swift.

Contributor checklist ✅

  • The code has been linted using run mise run lint:fix
  • The change is tested via unit testing or acceptance testing, or both
  • The title of the PR is formulated in a way that is usable as a changelog entry
  • In case the PR introduces changes that affect users, the documentation has been updated

Reviewer checklist ✅

  • The code architecture and patterns are consistent with the rest of the codebase
  • Reviewer has checked that, if needed, the PR includes the label changelog:added, changelog:fixed, or changelog:changed, and the title is usable as a changelog entry

@pepicrft pepicrft requested review from fortmarek and a team January 29, 2024 12:52
@pepicrft pepicrft self-assigned this Jan 29, 2024
@pepicrft pepicrft requested review from kwridan and removed request for a team January 29, 2024 12:52
Copy link
Member

@fortmarek fortmarek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find 👏

@pepicrft pepicrft merged commit 1436cb4 into main Jan 30, 2024
8 of 9 checks passed
@pepicrft pepicrft deleted the fix-macros-editor branch January 30, 2024 06:52
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.

None yet

2 participants