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

Deprecate api's exposing detekt-core implementation details #2365

Closed
arturbosch opened this issue Feb 23, 2020 · 0 comments
Closed

Deprecate api's exposing detekt-core implementation details #2365

arturbosch opened this issue Feb 23, 2020 · 0 comments

Comments

@arturbosch
Copy link
Member

arturbosch commented Feb 23, 2020

Expected Behavior

Following classes/functions exposes implementation details and should be moved to detekt-core or the inernal package:

  • RuleSet#accept
  • RuleSetProvider#buildRuleSet
  • EmptyConfig
  • YamlConfig
  • BaseConfig
  • BaseRule (sealed)

Following classes should be supported but moved to a utils package

  • LazyRegex
  • AnnotationExcluder
  • SplitPattern

Current Behavior

Above mentioned classes expose implementation details.

Context

Code in detekt-api exposes internal implementation details of detekt-core

arturbosch added a commit that referenced this issue Mar 9, 2020


A Config is a long lived object and is derived via subConfig a lot.
Keeping track of the parent it was derived, creates long-lived object chains which takes the GC longer to release them.
It can even lead to OOM if detekt get's embedded in an other application which reuses the top most Config object.
The property 'parentPath' of the Config interface can be used as a replacement for parent.key calls.
arturbosch added a commit that referenced this issue Mar 9, 2020


A Config is a long lived object and is derived via subConfig a lot.
Keeping track of the parent it was derived, creates long-lived object chains which takes the GC longer to release them.
It can even lead to OOM if detekt get's embedded in an other application which reuses the top most Config object.
The property 'parentPath' of the Config interface can be used as a replacement for parent.key calls.
arturbosch added a commit that referenced this issue Mar 9, 2020


A Config is a long lived object and is derived via subConfig a lot.
Keeping track of the parent it was derived, creates long-lived object chains which takes the GC longer to release them.
It can even lead to OOM if detekt get's embedded in an other application which reuses the top most Config object.
The property 'parentPath' of the Config interface can be used as a replacement for parent.key calls.
arturbosch added a commit that referenced this issue Mar 9, 2020
 (#2421)

A Config is a long lived object and is derived via subConfig a lot.
Keeping track of the parent it was derived, creates long-lived object chains which takes the GC longer to release them.
It can even lead to OOM if detekt get's embedded in an other application which reuses the top most Config object.
The property 'parentPath' of the Config interface can be used as a replacement for parent.key calls.
@arturbosch arturbosch changed the title Api exposes implementation details Deprecate api's exposing detekt-core implementation details Mar 15, 2020
arturbosch added a commit that referenced this issue Mar 15, 2020
* Deprecate BaseRule and state that it will be make sealed - #2365

* Update detekt-api/src/main/kotlin/io/gitlab/arturbosch/detekt/api/BaseRule.kt

Co-Authored-By: M Schalk <30376729+schalkms@users.noreply.github.com>

Co-authored-by: M Schalk <30376729+schalkms@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant