Status Update
Comments
vi...@google.com <vi...@google.com> #2
zs...@salesforce.com <zs...@salesforce.com> #3
zs...@salesforce.com <zs...@salesforce.com> #4
tn...@google.com <tn...@google.com> #5
da...@gmail.com <da...@gmail.com> #6
gh...@google.com <gh...@google.com> #7
I.e., the location of lint.jar files in the Gradle build output directory has changed again (see change I0ed76e7d1).
This time the hard-coded paths in Lint were updated in tandem, but unfortunately the previous paths were not preserved, and so backwards compatibility was broken.
gh...@google.com <gh...@google.com> #8
gh...@google.com <gh...@google.com> #9
co...@protonmail.com <co...@protonmail.com> #10
Seemed to stop working after that. I have tried 3.6 RC1 with no luck and no luck with 4.0 c8.
co...@protonmail.com <co...@protonmail.com> #11
Still not working. This used to work in 3.5.+
Running
/gradlew app:lint
generates an html file where I can see my custom lint checks are reported. But still no lint checks working inside of the IDE.
co...@protonmail.com <co...@protonmail.com> #12
I'm using 3.6 RC2 and now my custom lint error was being reported. But it was being reported on some old code. i.e. I made a change in my xml to trigger my custom lint warning, but I didn't get any error. Then I reverted my change and I kept developing for about an hour, and now if I go back into that file I see the error, but it's incorrect.
Now I know what you're thinking... Sounds like your custom lint check has a bug. But this worked correctly in 3.5.
The worst thing is that since the error was wrong, I tried a clean then build and now I don't see the error at all. If I change my xml to trigger the error, it still doesn't show.
It 100% showed my custom lint check (which is good) but it seemed to show it on an outdated change (which is bad). And now I can't even get it to show anymore if I try to force a failure again. The only think I can think of is that I ran /gradlew app:lint in command line and it found my actual errors. So maybe that somehow got picked up in the IDE.
Let me know how I can help. It's critical to my workflow that my custom lint checks work.
co...@protonmail.com <co...@protonmail.com> #13
I went into latest stable (3.5.3) updated AGP and lint version. No lint errors reported from my custom checks in the IDE. Ran lint via command line. Still nothing.
Then I tried the same in 3.5.2. Nothing. 3.5.1. Still nothing.
Went back to 3.6 RC2. Updated AGP and lint version. And now my file shows the lint error correctly.
Fixed the error. But lint still flags it as an error. That's weird. Changed AGP to 3.6.0-rc01 and 26.6.0-rc01. Still shows an error. Which is weird because in that version it wasn't ever picking up my changes.
I can right click my xml file (that is showing an xml error, but it shouldn't because I fixed it) and analyze > inspect code > just this file, and I can see that it's showing my error! This isn't right. If I now run gradlew app:lint I can see that it DOES show that I have an error. This is not right.
Something weird is happening. Wish I could actually find real repro steps or something more. But something in 3.6.0 RC2 is definitely triggering my lint module to finally be recognized, but it seems to get stuck or never run again?
co...@protonmail.com <co...@protonmail.com> #14
gh...@google.com <gh...@google.com> #15
Fixed the error. But lint still flags it as an error. That's weird.
I think this will be difficult to diagnose without a repro case, unfortunately.
co...@protonmail.com <co...@protonmail.com> #16
gh...@google.com <gh...@google.com> #17
Any logs or debug statements I can run?
Unfortunately no.
Is it possible to share the source code for your Lint check? Maybe we can spot something relevant there.
co...@protonmail.com <co...@protonmail.com> #18
After I was messing with AGP version and lint version, I noticed that my lint checks were working again. One of my custom lint checks is that I require a style tag to be set. I saw the error when no style was set. Hooray. Then I added a style and it went away. Working as expected.
At this point, I went in and updated the error message that it should give the user in the IDE because I noticed a typo. I noticed that my typo never showed. Kept showing the old error message. I tried building/make project. Nothing. Tried running gradlew mylintmodule:assemble .... my update still doesn't show.
Now I try cleaning the project. No lint error even though there is no style. Okay. Rebuild. Nothing. Rebuild via gradle on cmd line? still nothing. invalidate caches and restart? nothing. I basically tried for hours trying to trigger it to sense my lint checks again and nothing.
This is similar to the behavior I noted weeks ago though. It started to magically work after I updated AGP and lint version numbers, and then after cleaning my project it just broke again. I do use timber (I know it ships a custom lint check) and I use
co...@protonmail.com <co...@protonmail.com> #19
=(
Decided to create a quick POC that closely resembles my production app (timber, rxlint, my custom lint module), but I couldn't even get my simple custom lint module working in this POC. Maybe you can spot an issue? I copied this mostly from my production project, but I know my production projects custom lint module configuration was working correctly because my custom lint checks used to work flawlessly.
Maybe you can spot an error in this repo?
gh...@google.com <gh...@google.com> #20
Thank you for the sample project!
I tried opening that project locally. After ./gradlew clean
, the custom Lint check indeed does not work in the IDE.
Running these commands does not fix the check in the IDE:
./gradlew assembleDebug
./gradlew :custom_lint_checks:assemble
- "Make Project" in the IDE
But running these commands does fix the check in the IDE;
./gradlew assemble
./gradlew lintDebug
I agree this is confusing behavior, especially the fact that "Make Project" does not prepare the custom Lint checks for use in the IDE. I filed a new bug for this at
co...@protonmail.com <co...@protonmail.com> #21
gh...@google.com <gh...@google.com> #22
that's what the lint video from ADS shows.
Indeed, I think this is a regression. See
Description
I reproduced the issue with Timber (
Steps to reproduce:
1. Open the Timber project.
2. Open `LintActivity` in the timber-sample module.
3. Uncheck all the suppressions.
4. From the command line, run `$ ./gradlew :timber-sample:lintDebug`. It should find a ton of issues.
5. However, if you go back into Android Studio, you should not see any lint detections in `LintActivity`.
6. You can also run "Inspect code" on `LintActivity`; it will also not detect any issues.
If you go into `timber-sample/build.gradle` and edit it so that the Timber implementation is remote instead of local (e.g. `implementation 'com.jakewharton.timber:timber:4.7.1'`), then the lint checks above work. Thus, it's only a problem if the lint check module is local.
Build: AI-192.6817.14.36.6018865, 201911192155,
AI-192.6817.14.36.6018865, JRE 1.8.0_212-release-1586-b4-5784211x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.14.6, screens 2560x1440
AS: 3.6 Beta 5; Kotlin plugin: 1.3.61-release-Studio3.6-1; Android Gradle Plugin: 3.4.0; Gradle: 5.2.1; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: 3.15.5
IMPORTANT: Please read