Skip to content

analyze local variable instantiations #1334

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

analyze local variable instantiations #1334

wants to merge 2 commits into from

Conversation

ttho
Copy link

@ttho ttho commented Aug 1, 2024

So far local variable instantiations were not analyzed at all, leaving gaps in the evaluation of dependency rules. If a local variable of a certain type was instantiated in a method, but no other use of that type was present (e.g. a method call on the type, or a field access), the dependency from the method to that type was undetected. Here, if enabled by a new configuration property (to preserve backward compatibility and performance), local variable instantiations add class dependencies from the surrounding method to the type of the variable and, if that type has generic type parameters, also from the method to any concrete generic type.

Issue: #768

@olenz
Copy link

olenz commented Mar 26, 2025

What has happened to this PR? What is needed for it to be integrated? We are employing the patch successfully since a few months, what is still missing?

@hankem
Copy link
Member

hankem commented Mar 27, 2025

Thanks for the reminder! I'm sorry; the honest answer is that it was overlooked. I'll try to take a look at it soon.

ttho added 2 commits March 27, 2025 07:34
So far local variable instantiations were not analyzed at all, leaving gaps in the evaluation of
dependency rules. If a local variable of a certain type was instantiated in a method, but no other use of that type
was present (e.g. a method call on the type, or a field access), the dependency from the method to that type
was undetected. Here, if enabled by a new configuration property (to preserve backward compatibility and
performance), local variable instantiations add class dependencies from the surrounding method to the type of the
variable and, if that type has generic type parameters, also from the method to any concrete generic type.

Issue: TNG#768
Signed-off-by: Timo Thomas <[email protected]>
Issue: TNG#768
Signed-off-by: Timo Thomas <[email protected]>
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

Successfully merging this pull request may close these issues.

3 participants