-
Notifications
You must be signed in to change notification settings - Fork 15
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
hide_prod_dependencies / hide_other_dependencies / etc #42
Comments
Hi @chrisballinger So I would deprecate the current logic without branch name and would make two new ones https://github.com/shibapm/Rocket/blob/master/Sources/RocketLib/Step.swift#L1-L10 (because they contain dev in the name) (I would rename Now that you have your two new steps you can have an Executor for them. https://github.com/shibapm/Rocket/blob/master/Sources/RocketLib/Step.swift#L16-L36 Executors can also have parameters (then you can have one step that has as parameter the string that you have on the comment, and the default value is dev) https://github.com/shibapm/Rocket/blob/master/Sources/RocketLib/Executors/HideDevDependenciesExecutor.swift#L3 the parameters are defined using the Generic value in the class. Parameters needs to implement StepParameters protocol, that requires an init with dictionary https://github.com/shibapm/Rocket/blob/master/Sources/RocketLib/Parameters/ModifyDevDependenciesParameters.swift The current dev dependencies executors (https://github.com/shibapm/Rocket/blob/master/Sources/RocketLib/Executors/HideDevDependenciesExecutor.swift https://github.com/shibapm/Rocket/blob/master/Sources/RocketLib/Executors/UnhideDevDependenciesExecutor.swift) use That has all the logic you need, if you parametrise https://github.com/shibapm/Rocket/blob/master/Sources/RocketLib/Executors/Utils/DevDependenciesModifier.swift#L53 it should work. Please let me know if you need any more help :) |
Awesome, thanks so much for the walkthrough! |
I think I encountered a scenario where it would be useful to have an additional flag beyond
// dev
for other dependencies, Possiblyprod
would be a good start, but maybe it could be more flexible and support likehide_${whatever}_dependencies
for anything tagged// whatever
. I have been prototyping a Swift Package for OpenCV, which uses a binary xcframework dependency. Normally it will point to a remote URL for a tagged release, but if you want to runswift test
against local changes, you'd need to comment out thebinaryTarget
url/checksum and use a local path version instead.This seems like the perfect candidate for that scenario.
Does this sound like a feature you'd consider merging? And, if so, could someone point me in the right direction for hacking on this? Thanks!
The text was updated successfully, but these errors were encountered: