|
2 | 2 |
|
3 | 3 | This chapter lists recent changes to lint that affect lint check
|
4 | 4 | authors: new features, API and behavior changes, and so on. For
|
5 |
| -information about user visible changes to lint, see |
6 |
| -[](../usage/changes.md.html). |
| 5 | +information about user visible changes to lint, see the User |
| 6 | +Guide. |
7 | 7 |
|
8 | 8 | **7.0**
|
9 | 9 |
|
|
12 | 12 | * Partial analysis. Lint's architecture has changed to support better
|
13 | 13 | scalability across large projects, where module results can be
|
14 | 14 | cached, etc. See the api-guide's dedicated chapter for more details.
|
15 |
| - To opt in before it's turned on by default to test this on your full |
16 |
| - Gradle projects rather than just the detector tests, add |
| 15 | + It is enabled by default starting in AGP 7.0.0-alpha13, but you can |
| 16 | + disable it by adding |
17 | 17 |
|
18 |
| - `android.experimental.useLintPartialAnalysis=true` |
| 18 | + `android.enableParallelLint=false` |
19 | 19 |
|
20 | 20 | to your `gradle.properties` file. If you want to debug your lint check
|
21 | 21 | you may want to also set
|
|
72 | 72 |
|
73 | 73 | * API documentation is now available.
|
74 | 74 |
|
| 75 | +* Certain Kotlin PSI elements have new implementations known as |
| 76 | + _ultra light classes_. Ultra light classes improve performance |
| 77 | + by answering PSI queries "directly from source" rather than |
| 78 | + delegating to the Kotlin compiler backend. You may see ultra |
| 79 | + light classes when accessing the `UElement.javaPsi` property of a |
| 80 | + Kotlin UAST element. They can also appear when resolving references. |
| 81 | + For example, resolving a Kotlin field reference to its declaration |
| 82 | + may result in an instance of `KtUltraLightFieldForSourceDeclaration`. |
| 83 | + As a reminder, Kotlin light classes represent the "Java view" of an |
| 84 | + underlying Kotlin PSI element. To access the underlying Kotlin PSI |
| 85 | + element you should use `UElement.sourcePsi` (preferred) |
| 86 | + or otherwise the extension property `PsiElement.unwrapped` (declared |
| 87 | + in `org.jetbrains.kotlin.asJava`). |
| 88 | + |
| 89 | +* There is a new bug where calling `getNameIdentifier()` on Kotlin |
| 90 | + fields may return `null` |
| 91 | + ([KT-45629](https://youtrack.jetbrains.com/issue/KT-45629)). |
| 92 | + As a workaround you can use `JavaContext.findNameElement()` instead. |
| 93 | + |
| 94 | +* Kotlin references to Java methods now trigger both the |
| 95 | + `visitMethodCall()` callback _and_ the `visitReference()` callback. |
| 96 | + Previously only `visitMethodCall()` was triggered. |
| 97 | + |
75 | 98 | <!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="markdeep.min.js" charset="utf-8"></script><script src="https://morgan3d.github.io/markdeep/latest/markdeep.min.js" charset="utf-8"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>
|
0 commit comments