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

grouping layers #77

Closed
slde-flash opened this issue Apr 30, 2016 · 6 comments · Fixed by #570
Closed

grouping layers #77

slde-flash opened this issue Apr 30, 2016 · 6 comments · Fixed by #570
Assignees

Comments

@slde-flash
Copy link
Contributor

No description provided.

@slde-flash slde-flash added this to the 1.0 milestone Apr 30, 2016
@jakzal
Copy link

jakzal commented May 6, 2016

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).

@slde-flash
Copy link
Contributor Author

thanks @jakzal,
i am working on #76 which will allow more complex configurations. this won't help to visualize high level dependencies, but it would be much more easy to define and enforce them.

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.

@theofidry
Copy link
Contributor

@jakzal on my end I solved it by having several files to run different level of analysis, cf. #68

@jakzal
Copy link

jakzal commented May 9, 2016

@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! :)

@theofidry
Copy link
Contributor

@jakzal for the reasons explained in #68, this solution doesn't suit ;)

@slde-flash
Copy link
Contributor Author

i am still playing with different solutions. #90

@slde-flash slde-flash self-assigned this May 16, 2016
@smoench smoench removed this from the 1.0 milestone Oct 22, 2020
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 a pull request may close this issue.

5 participants