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

better manage deadCode #549

Open
anneetien opened this issue Feb 21, 2023 · 2 comments
Open

better manage deadCode #549

anneetien opened this issue Feb 21, 2023 · 2 comments

Comments

@anneetien
Copy link
Contributor

The way deadCode is computed (taking into account the superClasses and implementing interfaces) is not well done.
We have to imprive it.
We have to deal also with methods with parameterized parameters.
After we will have to deal also with dead branch.

@jecisc
Copy link
Member

jecisc commented Jan 30, 2024

I cannot find #deadCode in Moose 11. But we have #isDead that is implemented using the MM and MooseQuery. It checks if it has an incoming dependency and returns true only if there is none.

Is it still valid?

@NicolasAnquetil
Copy link
Contributor

your are asking if the issue or the method #isDead is still valid ?

  • The issue is still valid
  • I think #isDead is too complex to be implemented in a generic method of entities.

May be we can rename #isDead to #hasNoIncoming or #hasNoClient ... ?

And for a real dead code detection, we need a more complex implementation.
This calls for "complex" queries or algorithms that would be reusable but that would need fine tuning for specific meta-models or even specific applications (for example how to detect that a service in a client/server application is or not dead?)

see moosetechnology/Moose#2523

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