-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: Make diagnose-api-breaking-changes handle git submodules #8192
base: main
Are you sure you want to change the base?
Fix: Make diagnose-api-breaking-changes handle git submodules #8192
Conversation
This commit improves the diagnose-api-breaking-changes command to properly handle packages with git submodules: - Add proper submodule initialization and management - Implement comprehensive APIDigester for analyzing API changes - Add support for recursive analysis of submodules - Add detailed change reporting with categorization (breaking/non-breaking/deprecated) - Improve error handling and reporting - Add proper documentation Resolves #XXX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not review the change based on the single blocking comment I have.
Package.swift
Outdated
//===----------------------------------------------------------------------===// | ||
|
||
import class Foundation.ProcessInfo | ||
// swift-tools-version:5.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue (blocking): why did we downgrade the tool version to 5.5?
This commit improves the diagnose-api-breaking-changes command to properly handle packages with git submodules: - Add proper submodule initialization and management - Implement comprehensive APIDigester for analyzing API changes - Add support for recursive analysis of submodules - Add detailed change reporting with categorization (breaking/non-breaking/deprecated) - Improve error handling and reporting - Add proper documentation Resolves #XXX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem
The diagnose-api-breaking-changes
command currently doesn't properly handle packages with git submodules, making it difficult to track API changes across the entire package hierarchy.
Solution
This PR improves the command to properly handle git submodules by:
- Adding proper submodule initialization
- Implementing a comprehensive API analysis system
- Supporting recursive analysis of submodules
- Providing detailed change reporting
Key Changes
-
DiagnoseAPIBreakingChanges.swift:
- Added proper submodule initialization
- Improved workspace handling
- Added detailed change reporting
-
APIDigester.swift:
- Implemented comprehensive API analysis
- Added support for baseline comparison
- Added detailed symbol parsing
- Improved error handling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are too many delta in the Package.swift
. Is the PR source branch based on an older commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is seems odd this fix would require a significant change in the Packages.swift
file. Are these changes necessary? Are the features/functionality for removing the previous content still supported still supported?
If the answer to the second question is "no", we need to update this Packages.swift
to only include changes required to fix the specific issue.
@bkhouri Understood, thank you for your feedback. I'll take a closer look again when I have some free time. I appreciate your patience in the meantime. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this is a reimplementation of the existing diagnose-api-breaking-changes
command.
I'd recommend looking at this existing command and identifying how it could be modified to support submodules correctly instead of adding a new and conflicting implementation.
This commit improves the diagnose-api-breaking-changes command to properly handle packages with git submodules:
Resolves #8192
Motivation:
When running diagnose-api-breaking-changes against a package with git submodules, the tool does not properly handle submodule initialization and analysis.
Modifications:
Result:
After this change, the diagnose-api-breaking-changes command will properly handle packages with git submodules by: