-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add Swift Package comparator #74
Conversation
722ba1d
to
799c07d
Compare
• ComposableArchitecture package reference | ||
◦ version = .upToNextMajorVersion(0.9.0) | ||
◦ version = .upToNextMinorVersion(0.9.0) |
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 is potentially some redundancy here as the same information can be seen within SWIFT_PACKAGES
section. The reason I opted for adding it is to cater for the scenario where a package product doesn't have a source package specified (e.g. like the Swifter example below) and that can only be highlighted here as it's a difference at the linked dependency level.
def substitute_project_paths(arg): | ||
dirname = os.path.dirname(sys.argv[0]) | ||
fixtures_path = os.path.join(dirname, "../Fixtures") | ||
return re.sub("{(.*)}", "{}/\\1/Project.xcodeproj".format(fixtures_path), arg) |
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.
this should allow us to add new fixtures without needing to modify the python script each time
Codecov Report
@@ Coverage Diff @@
## main #74 +/- ##
==========================================
- Coverage 96.21% 96.13% -0.09%
==========================================
Files 45 47 +2
Lines 1718 1809 +91
==========================================
+ Hits 1653 1739 +86
- Misses 65 70 +5
Continue to review full report at Codecov.
|
799c07d
to
f23a52e
Compare
:-) sure, feel free to update the threshold or add a simple UT for |
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.
The comparator is great 👍
import XCTest | ||
|
||
final class SwiftPackageDescriptorTests: XCTestCase { | ||
// swiftlint:disable line_length |
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.
Maybe we can re-enable the rule in the end of the tests (// swiftlint:enable line_length
), or break the lines?
729e2b8
to
b23f5fe
Compare
- Added a new comparator to check for Swift Package differences - Additionally, the linked dependencies comparator has been updated to accomodate package products references Test Plan - Run `swift run xcdiff -v` within `Fixtures/ios_project_with_swift_packages` - Verify the results include Swift Package comparison results Signed-off-by: Kassem Wridan <kwridan@bloomberg.net>
b23f5fe
to
d28897b
Compare
Issue number of the reported bug or feature request: #24
Describe your changes
Testing performed
swift run xcdiff -v
withinFixtures/ios_project_with_swift_packages