Rugby
Rugby copied to clipboard
๐ญ Force exclude a dependency from a plan
Is your feature request related to a problem? Please describe.
I would like to have the ability to force exclude a specific dependency even though it is included in the plan by
- build
- command: cache
include: [Alamofire, SnapKit]
Describe the solution you'd like
ยง rugby --plan build --exclude Alamofire SnapKit
ยง rugby --plan build -e Alamofire SnapKit
@nonameplum Hello! Now you can add exclude to the plan. Like this:
- build
- command: cache
include: [Alamofire, SnapKit]
exclude: [SomePod]
In this solution, there is a problem. Your plan can contain many different commands and also, some of them can be duplicated (like drop
command). So, it's not easy to add a common interface for different user plans. And it's not clear how to manage additional flags if command duplicates.
rugby --plan build --exclude Alamofire SnapKit
rugby --plan build -e Alamofire SnapKit
But anyway, thank you for your request, and feel free to add some more info or implement a draft.
Feel free to reopen the issue if you have more information
Yes, I get your point. What if we could do something like:
rugby --plan build --force build.drop.exclude+=[SnapKit]
The idea would be to specify which dependent command we would like to affect.
The main reason why I bring this up is that I have a few plans with very useful reusable commands that I use a lot.
So far so good, but the problem is that one of them catches the dependencies that I want including my development frameworks (pods). Currently, every time I work on a thing that requires changing something on one of my frameworks, it forces me to edit the plans.yml
file. I need to exclude them from caching because it is much easier to work with as I can edit the files easily both in the main app and the frameworks that I want at the time.
Yeah, I see. Thank you for your answer.
But we can't limit the plan with only one drop command. Someone already can use several drop commands in one plan. So we need a more general solution. The same with other different fields of each command of Rugby. There can be corner cases. But I think I understand your idea.
Right now It looks like a complex feature request for me. So, let's reopen it, but sorry I don't have enough free time to implement any request for now.
Also, maybe you can find these features useful for your needs:
- You can read all code with such option: https://github.com/swiftyfinch/Rugby/blob/main/Docs/Cache.md#keep-pods-group-in-project
- Here you can create a base plan and reuse it in your other plans: https://github.com/swiftyfinch/Rugby/blob/main/Docs/Plans.md#-generate-example