Skip to content

[6.2][InterfaceGen] Merge exported modules with the same public name in generated interface #81259

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

Merged
merged 1 commit into from
May 8, 2025

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented May 2, 2025

  • Explanation:
    If a module has the same public-module-name as the module being generated and its import is exported, merge it into the same generated interface. Use the public module name for any module names being returned from SourceKit requests (eg. in cursor info and documentation). Also fixes various always-imported modules from being printed.

(cherry picked from commit ddddc66)

  • Scope: SourceKit generated interface and cursor info
  • Issues: rdar://137887712
  • Original PRs: Merge exported modules with the same public name in generated interface #80958
  • Risk: For the compiler, none. For SourceKit the main risk is for duplicate imports in the generated interface, which while weird, doesn't prevent the feature from working.
  • Testing: Large number of existing tests in this area (hence all the updates for SwiftOnoneSupport removal). Also added a test case for public-module-name specifically.
  • Reviewers: @rintaro

If a module has the same `public-module-name` as the module being
generated and its import is exported, merge it into the same generated
interface.

Fix various always-imported modules from being printed while here and
update all the tests that checked for them.

Resolves rdar://137887712.

(cherry picked from commit ddddc66)
@bnbarham bnbarham requested a review from a team as a code owner May 2, 2025 20:00
@bnbarham
Copy link
Contributor Author

bnbarham commented May 2, 2025

@swift-ci please test

@bnbarham
Copy link
Contributor Author

bnbarham commented May 5, 2025

@swift-ci please test macOS platform

1 similar comment
@bnbarham
Copy link
Contributor Author

bnbarham commented May 8, 2025

@swift-ci please test macOS platform

@bnbarham bnbarham merged commit 464223e into swiftlang:release/6.2 May 8, 2025
5 checks passed
@bnbarham bnbarham deleted the cherry-merge-modules branch May 8, 2025 17:17
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