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

Create single task for tree configuration #77

Open
qwert2603 opened this issue Jan 24, 2023 · 2 comments
Open

Create single task for tree configuration #77

qwert2603 opened this issue Jan 24, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@qwert2603
Copy link
Contributor

Now the separated DependencyTreeDiffTask instance is created for each guarded configuration.

But that is not necessary, because the dependencies tree rendering is done by DependencyGraphsRenderer in AsciiDependencyReportRenderer2, that can be used with different configurations, depending on passed ResolvedComponentResult.

So rendering, comparing and baselining dependencies tree for all can be performed in one single task, like for the list configuration in DependencyGuardListTask.

Also, depending on the code complexity, handling list and task configurations may be done in the single task, since they have a lot of similar configs and logic.

@handstandsam
Copy link
Collaborator

Thanks! I don't mind "combining" the tasks, but would want to keep their logic very separated in the codebase as they are similar, but very different.

I like the saying: "Write code so it can be deleted". As long as it is super easy to delete or refactor out the List or Tree task with a couple lines, I'm happy to only have 2 tasks total - dependencyGuard and dependencyGuardBaseline.

Good idea!

@qwert2603
Copy link
Contributor Author

Yes, agree.
The first point is to create single tree task for all configurations.

And after that there may be some combining of list and tree tasks, if it will make the code easier to read and support.

@handstandsam handstandsam added the enhancement New feature or request label Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants