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

Not working correctly with umbrella projects #28

Open
WindDrifter opened this issue Nov 2, 2021 · 4 comments
Open

Not working correctly with umbrella projects #28

WindDrifter opened this issue Nov 2, 2021 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed idea

Comments

@WindDrifter
Copy link

I tried using this with an umbrella project there are issues that I found. Note that I ran mix compile at root of project

Issue one:
put compilers: [:unused] ++ Mix.compilers() in the root mix.exs file will generate 0 result (I purposely put a unused function in one of the sub project that is inside the umbrella)

Issue two
put compilers: [:unused] ++ Mix.compilers() in all sub projects' mix.exs file will generate false postivies (ie subproject one function will be deem unused even though it is used by subproject two)

@denispeplin
Copy link

Same for me. I tried it both ways, one way it doesn't show anything, another way it shows false positives.

@hauleth
Copy link
Owner

hauleth commented Nov 3, 2021

Yes, this is known limitation of the project at the moment. Reason for that is simple:

In umbrella there is no distinction between other project in the umbrella and regular dependency.

You need to remember that at it's core umbrella projects are no different from other projects that use {:my_dep, path: "../my_dep"}. So while it is welcome improvement, I do not have interest in working on it personally, as in my code book each application in umbrella should be considered as a standalone project, that by the convenience is stored in one repository.

@hauleth hauleth added enhancement New feature or request help wanted Extra attention is needed idea labels Nov 3, 2021
@denispeplin
Copy link

in my code book each application in umbrella should be considered as a standalone project, that by the convenience is stored in one repository

So maybe it's for some distant future. I can tell it from my experience: for an umbrella project that several years old and being built by dozens of people, having unused function detection would be quite valuable.

@hauleth
Copy link
Owner

hauleth commented Nov 24, 2021

Well, if someone is willing to spend time on such feature then I am willing to review and help with implementation, but even if I would have use for such feature, currently I do not have time to work on it. Day to day job and kid is too absorbing to have even moment to spare.

I can guide potential implementor though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed idea
Projects
None yet
Development

No branches or pull requests

3 participants