Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

[Change request] Holistic project support #1185

Closed
1 task
oravecz opened this issue Feb 8, 2023 · 4 comments
Closed
1 task

[Change request] Holistic project support #1185

oravecz opened this issue Feb 8, 2023 · 4 comments
Labels
awaiting info Requires more information from the customer to progress type: question Further information is requested

Comments

@oravecz
Copy link

oravecz commented Feb 8, 2023

DCM version

v5.5.1

What problem do you want to solve?

DCM currently analyzes a pubspec as standalone, and doesn't consider transitive packages, especially those which are present within a packages folder in the project itself.

This results is metrics surrounding unused code/files etc. to be misleading. Any public APIs or components exposed by the package are regular used by consuming packages, not the package where it is created.

What do you think is the correct solution?

I'd like DCM to navigate packages which are not located in the pub cache, such as following a path dependency or perhaps a github dependency prior to determining if code or a file is unused.

Participation

  • I am willing to submit a pull request for this change.

Additional comments

No response

@oravecz oravecz added the type: enhancement New feature or request label Feb 8, 2023
@incendial
Copy link
Member

Have you tried --monorepo flag for unused code / files plus calling the command from the packages/ folder?

@oravecz
Copy link
Author

oravecz commented Feb 8, 2023

In my project I use a packages folder for feature development. This permits me some type of monorepo structure where different teams can be responsible for their own feature sets, but these packages are not intended on being deployed to a public (or internal) pub.dev repository. It's just an code/team-organization concept.

I would like to scan the project as a whole, and identify any widgets, extensions, or functions which are unused across the application as a whole. Not per package.

Edit: Another way of thinking about it is, I would like to know what tree shaking will remove from my project.

@incendial
Copy link
Member

So that's exactly what I'm suggesting you to do: if you run check-unused-code packages/ --monorepo it should give you exactly what you're looking for.

@incendial incendial added type: question Further information is requested awaiting info Requires more information from the customer to progress and removed type: enhancement New feature or request labels Feb 9, 2023
@github-actions
Copy link

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this issue for now. Please don't hesitate to comment on the issue if you have any more information for us; we will reopen it right away! Thanks for your contribution!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awaiting info Requires more information from the customer to progress type: question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants