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 module path for Swift 6 builds #626

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

abhi-m-simformsolutons
Copy link
Contributor

@abhi-m-simformsolutons abhi-m-simformsolutons commented Oct 10, 2024

When building with swift 6, Danger's

  • Danger*.abi.json
  • Danger*.swiftmodule
  • Danger*.swiftdoc
  • Danger*.swiftsourceinfo

are now located in .build/debug/Modules location instead of .build/debug/ module.

With swift 6 SwiftFormat generates two module maps SwiftFormat.build & SwiftFormat-tool.build. at .build/debug/. Which cause - error: redefinition of module 'SwiftFormat'

This change conditionally update swift's import search path to .build/debug/Modules to address both issues.

Related issues:
#615
#623

When building with swift 6, Danger's
- Danger*.abi.json
- **Danger*.swiftmodule**
- Danger*.swiftdoc
- Danger*.swiftsourceinfo
are now located in `.build/debug/Modules` location instead of `.build/debug/` module.

With swift 6 `SwiftFormat` generates two module maps `SwiftFormat.build` & `SwiftFormat-tool.build`. at `.build/debug/`.
Which cause `- error: redefinition of module 'SwiftFormat'`

This change conditionally update swift's import search path to `.build/debug/Modules` to address both issues.
Copy link
Member

@f-meloni f-meloni left a comment

Choose a reason for hiding this comment

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

Fantastic! Thank you :)

@abhi-m-simformsolutons
Copy link
Contributor Author

Hi @f-meloni ,
This PR introduces breaking changes for Xcode 16 and Swift 6. Could you please merge it into master as soon as possible? I also updated the changelog.

@f-meloni f-meloni merged commit 5700759 into danger:master Oct 14, 2024
14 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