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

Filter dependencies by target #6

Merged
merged 20 commits into from
Oct 18, 2022
Merged

Filter dependencies by target #6

merged 20 commits into from
Oct 18, 2022

Conversation

osrufung
Copy link
Collaborator

@osrufung osrufung commented Sep 9, 2022

This fixes #7

Currently we get all the dependencies from the Podfile.lock without evaluating which targets those dependencies belongs. We want to introduce a new parameter (target) to filter only the dependencies for that target.

  • apply this in the compare command and adapt the tests
  • apply this in all the available commands
  • update documentation

Copy link
Collaborator

@sdidla sdidla left a comment

Choose a reason for hiding this comment

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

I think the concept of DependencyModule.Module and Target are the same and can be combined together for a more unified logic. The whole concept of "virtual app" can go away so we always process podfile and podfile.lock

Sources/PodExtractor/Module+Podfile.swift Outdated Show resolved Hide resolved
Sources/PodExtractor/Module+Podfile.swift Outdated Show resolved Hide resolved
Sources/PodExtractor/Module+Podfile.swift Outdated Show resolved Hide resolved
Sources/jungle/Commands/CompareCommand.swift Show resolved Hide resolved
Sources/jungle/Commands/CompareCommand.swift Outdated Show resolved Hide resolved
Sources/jungle/Commands/CompareCommand.swift Show resolved Hide resolved
Sources/jungle/Commands/CompareCommand.swift Outdated Show resolved Hide resolved
Tests/PodExtractorTests/PodExtractorTests.swift Outdated Show resolved Hide resolved
@osrufung
Copy link
Collaborator Author

thanks @sdidla for your feedback. I had no time last week to do those changes. I´m going to apply this target concept also in history and graph commands to be consistent.

@osrufung osrufung marked this pull request as ready for review September 20, 2022 18:14
@osrufung
Copy link
Collaborator Author

@sdidla Can you take a look at the latest changes?

Copy link
Collaborator

@sdidla sdidla left a comment

Choose a reason for hiding this comment

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

I think we might need to process the pod file for each commit/git-revision

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@@ -16,8 +30,11 @@ struct CompareCommand: ParsableCommand {
)
var gitObjects: [String] = ["HEAD", "main", "master"]

@Option(help: "The Pod to compare. Omitting this generates compares a virtual `App` target that imports all Pods")
@Option(help: "The Pod to compare. If you specify something, target parameter will be ommited")
Copy link
Collaborator

Choose a reason for hiding this comment

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

See comments in the README

Sources/jungle/Commands/CompareCommand.swift Outdated Show resolved Hide resolved
Sources/jungle/Commands/GraphCommand.swift Outdated Show resolved Hide resolved
Sources/jungle/Commands/HistoryCommand.swift Outdated Show resolved Hide resolved
osrufung and others added 6 commits September 21, 2022 15:34
Co-authored-by: Shammi Didla <sdidla@gmail.com>
Co-authored-by: Shammi Didla <sdidla@gmail.com>
Co-authored-by: Shammi Didla <sdidla@gmail.com>
Co-authored-by: Shammi Didla <sdidla@gmail.com>
@osrufung osrufung merged commit 962d87f into main Oct 18, 2022
@osrufung osrufung deleted the target-detection branch October 18, 2022 15: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.

Filter dependencies by target
3 participants