Skip to content

Fix dependency sort order, Swift Package dropped randomly #16

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 3 commits into from
Nov 5, 2023
Merged

Fix dependency sort order, Swift Package dropped randomly #16

merged 3 commits into from
Nov 5, 2023

Conversation

irgaly
Copy link
Contributor

@irgaly irgaly commented Sep 7, 2023

Example Project Structure

  • Targets:
    • MyApp Target
      • Dependencies:
        • SwiftPackage RxSwift/RxCocoa
        • SwiftPackage RxSwift/RxSwift
        • Local Target MyComponent1
        • Local Target MyComponent2
    • MyComponent1 Target
      • Dependencies:
        • Local Target MyComponent2
    • MyComponent2 Target

Problem1: Swift Package is randomly dropped

expected

I expect this output for the example project.

MyApp["MyApp"]
MyComponent1["MyComponent1"]
MyComponent2["MyComponent2"]
RxSwift["RxSwift"]
RxCocoa["RxCocoa"]

actual

Swift Package is randomly dropped.

The output may be this:

...
MyApp["MyApp"]
MyComponent1["MyComponent1"]
MyComponent2["MyComponent2"]
RxCocoa["RxCocoa"]
...

or the output may be this:

...
MyApp["MyApp"]
MyComponent1["MyComponent1"]
MyComponent2["MyComponent2"]
RxSwift["RxSwift"]
...

Problem2: Dependency List has random order

expected

I expect this output for the example project (targets and dependencies has alphabetical order)

MyApp -> MyComponent1
MyApp -> MyComponent2
MyApp -> RxSwift
MyComponent1 -> MyComponent2

actual

The dependencies order has random order.

The output may be this:

...
MyApp -> RxSwift
MyApp -> MyComponent2
MyApp -> MyComponent1
MyComponent1 -> MyComponent2

or the output may be this:

MyComponent1 -> MyComponent2
MyApp -> RxSwift
MyApp -> MyComponent1
MyApp -> MyComponent2

@irgaly irgaly deleted the fix_dependency_order branch November 5, 2023 09:08
@yimajo
Copy link
Contributor

yimajo commented Nov 5, 2023

@irgaly Looks great, thanks!

@yimajo yimajo merged commit 5523a14 into CuriositySoftware:main Nov 5, 2023
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