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

Missing relationships & failure to ignore a module #49

Closed
krishofmans opened this issue Jun 5, 2024 · 5 comments
Closed

Missing relationships & failure to ignore a module #49

krishofmans opened this issue Jun 5, 2024 · 5 comments

Comments

@krishofmans
Copy link

🐛 Describe the bug

Hello,

first of all, thank you for this plugin, seems very usable in the early state it's in. This is definitly something that has been missing in the ecosystem for a while.

I've tried it out in a project that we're using as an example for clean architecture, thus it has a lot of modules.

But between the outgoing infra modules (sqldb, events-out) it seems to be missing the relations to the domain module (as they implement domain interfaces).

Also, I am able to ignore the vocabulary module (to which a lot of dependencies point at to make use of typed id classes etc), but I am unable to ignore the main partition module that points towards every module to bring it together to make it runnable.

⚠️ Current behavior

  • missing following relationships between modules:
  :code:infrastructure:outgoing:sqldb --> :code:application:domain
  :code:infrastructure:outgoing:events-out --> :code:application:domain
  • has these relationships that I would not expect because of ignoring the main module, and the subgraph
  subgraph :code
    :code:main["main"]
  end

  :code:main --> :code:application:usecases-api
  :code:main --> :code:application:usecases
  :code:main --> :code:application:policy-api
  :code:main --> :code:application:policy
  :code:main --> :code:infrastructure:incoming:commandbus
  :code:main --> :code:infrastructure:incoming:events-in
  :code:main --> :code:infrastructure:incoming:rest
  :code:main --> :code:infrastructure:incoming:validation
  :code:main --> :code:infrastructure:outgoing:events-out
  :code:main --> :code:infrastructure:outgoing:sqldb

✅ Expected behavior

This is the output that I would have expected from the plugin with the current config:

%%{
  init: {
    'theme': 'neutral'
  }
}%%

graph LR
  subgraph :code:application
    :code:application:usecases["usecases"]
    :code:application:usecases-api["usecases-api"]
    :code:application:domain-events["domain-events"]
    :code:application:policy-api["policy-api"]
    :code:application:policy["policy"]
    :code:application:domain["domain"]
  end
  subgraph :code:infrastructure:incoming
    :code:infrastructure:incoming:commandbus["commandbus"]
    :code:infrastructure:incoming:events-in["events-in"]
    :code:infrastructure:incoming:rest["rest"]
    :code:infrastructure:incoming:validation["validation"]
  end
  subgraph :code:infrastructure:outgoing
    :code:infrastructure:outgoing:events-out["events-out"]
    :code:infrastructure:outgoing:sqldb["sqldb"]
  end
  :code:application:usecases --> :code:application:usecases-api
  :code:application:usecases --> :code:application:domain-events
  :code:infrastructure:incoming:commandbus --> :code:application:usecases-api
  :code:infrastructure:incoming:events-in --> :code:application:domain-events
  :code:infrastructure:incoming:events-in --> :code:application:policy-api
  :code:application:policy --> :code:application:policy-api
  :code:application:policy --> :code:application:usecases-api
  :code:application:policy --> :code:application:domain-events
  :code:application:domain --> :code:application:domain-events
  :code:application:policy-api --> :code:application:domain-events
  :code:infrastructure:incoming:rest --> :code:application:usecases-api
  :code:infrastructure:incoming:validation --> :code:application:usecases-api
  :code:infrastructure:outgoing:sqldb --> :code:application:domain
  :code:infrastructure:outgoing:events-out --> :code:application:domain
Loading

💣 Steps to reproduce

Project can be found here:
https://gitlab.rotate-it.be/tripled/triple-todo/-/tree/main

Generated the graph using: ./gradlew createModuleGraph

📷 Screenshots

expected:
image

vs
current:
image

@iurysza
Copy link
Owner

iurysza commented Jun 8, 2024

Hey, thanks for the detailed issue! I'm on vacation now, but I'll check this out when I'm back next week. Cheers

@krishofmans
Copy link
Author

Have you had a chance to look at this? I will try to have a look myself otherwise to help out.

@iurysza
Copy link
Owner

iurysza commented Nov 9, 2024

Hey, @krishofmans! Is this still an issue? couldn't repro on my end 🤔

@npars
Copy link

npars commented Jan 21, 2025

I believe this is a documentation issue and I encountered the same problem.

If rootModulesRegex is not set then all modules will be selected as root modules. Once they are picked up as root modules it appears that they cannot be ignored via excludedModulesRegex.

The solution is to ensure you always set rootModulesRegex if you want to ignore certain other modules.

@iurysza
Copy link
Owner

iurysza commented Jan 28, 2025

Hey, thanks for pointing that out! I'll try to update docs.

@iurysza iurysza closed this as completed Jan 28, 2025
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

No branches or pull requests

3 participants