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
grouping layers #77
Comments
This would be a great addition. I just tried deptrac for the first time and being able to define layers within another layer is the only thing I seem to be missing. It should be possible to define high level dependency rules (controllers -> services -> repositories), and then additional dependencies withing the layer (services/A -> services/B). |
thanks @jakzal, i didn't tryed it, but for example you could build a configuration this way: paths: ./
exclude_files: []
layers:
- name: controllers
collectors:
- type: className
regex: .*Controllers.*
- name: services
collectors:
- type: className
regex: .*Services.*
- name: repositories
collectors:
- type: className
regex: .*Services.*
- name: servicesA
collectors:
- type: bool
- must:
# every rule form service
- type: className
regex: .*Services.*
# every rule from servicesA
- type: className
regex: .*ServicesA.*
- must_not:
# every rule from servicesB
- type: className
regex: .*ServicesB.*
- name: servicesB
collectors:
- type: bool
- must:
# every rule form service
- type: className
regex: .*Services.*
# every rule from servicesB
- type: className
regex: .*ServicesB.*
- must_not:
# every rule from servicesA
- type: className
regex: .*ServicesA.*
ruleset: [] don't be scared of the verbosity of this solution #76 will help to build such depfiles much more comfortable. the goal of this ticket would be generating a nice looking output based on such a (bit more complex) configuration. |
@slde-flash I actually solved it exactly the same way and that's why I came here to report we need a better way ;) @theofidry not ideal! :) |
i am still playing with different solutions. #90 |
No description provided.
The text was updated successfully, but these errors were encountered: