Status Update
Comments
vi...@google.com <vi...@google.com> #2
pa...@google.com <pa...@google.com>
qu...@google.com <qu...@google.com> #3
Thanks!
Other notes: I think this is technically a regression, because Lint checks are prepared during generateDebugSources
and that used to run during Gradle sync(?)
lb...@gmail.com <lb...@gmail.com> #4
1. I typically was using "make project" because that's what the lint video from ADS shows.
2. In the sample project, If I Right click activity main.xml > analyze > inspect code > Inspection Scope [FILE]
"No lint errors found." This is also weird. You would think that maybe forcefully inspecting the code would create the lint.jar file?
3. In my sample project, running ./gradlew lintDebug makes lint checks work in the IDE again. Amazing! Here is the output for example:
```
coltonidle:CustomLintChecksDoNotWork cidle$ ./gradlew lintDebug
> Task :app:lintDebug FAILED
Wrote HTML report to file:///Users/coltonidle/project/CustomLintChecksDoNotWork/app/build/reports/lint-results-debug.html
Wrote XML report to file:///Users/coltonidle/project/CustomLintChecksDoNotWork/app/build/reports/lint-results-debug.xml
FAILURE: Build failed with an exception.
```
Okay. That makes sense. Failed because of my custom lint error. Now let me try my production project that is a pretty big project, but it's not ridiculously complex. Pretty standard. I do have a few extra modules for a few custom views.
```
> Configure project :app
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
> Task :customView1:lintDebug
Wrote HTML report to file:///Users/coltonidle/project/myapp/customView1/build/reports/lint-results-debug.html
Wrote XML report to file:///Users/coltonidle/project/myapp/customView1/build/reports/lint-results-debug.xml
> Task :customView2:lintDebug
Wrote HTML report to file:///Users/coltonidle/project/myapp/customView2/build/reports/lint-results-debug.html
Wrote XML report to file:///Users/coltonidle/project/myapp/customView2/build/reports/lint-results-debug.xml
> Task :customView3:lintDebug
Wrote HTML report to file:///Users/coltonidle/project/myapp/customView3/build/reports/lint-results-debug.html
Wrote XML report to file:///Users/coltonidle/project/myapp/customView3/build/reports/lint-results-debug.xml
BUILD SUCCESSFUL in 22s
```
Hmmm. That's weird. Successful and not failed (like the sample) and also... where is my :app module outputs?
I see that in all my modules I have
lintOptions {
abortOnError false
}
but in my app module I have
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
so I thought maybe checkReleaseBuilds false, was the cause of some lint issue. But no. When I removed it, it still didn't show. So now I have another problem seemingly where lintDebug won't process my app module
4. Running ./gradlew assemble fails for me because it tries to run a release with signing configs I don't have available. Maybe this is the cause of why lint checks don't work via ./gradlew lintDebug?
Will keep investigating!
so...@google.com <so...@google.com> #5
This most definitely wasn't happening in the past. All of a sudden (couldn't pinpoint which AS of AGP version) it just stopped reporting custom lint checks in the IDE for my entire teams usual workflow. e.g. Write some code and deploy.
Once we noticed that they weren't properly showing then we started to try to force lint to rebuild or remake, but never got it to work. This also reminds me that a few weeks ago we also had an issue where we were making a change to module called customView1 and the changes weren't reflecting. We tried hitting the hammer icon and general clean and stuff, but nothing triggered it. Not sure how we got that module to rebuild, but maybe those things are somehow related as well?
lb...@gmail.com <lb...@gmail.com> #6
I found my issue. It was this that was in the ./gradlew assemble logs. This issue was something I added by accident yesterday when copying and pasting files into my sample project
Task :app:lintVitalStandardProdRelease
Could not load custom lint check jar file /Users/coltonidle/project/myapp/app/build/intermediates/lint_jar/global/lint.jar
I fixed the typo in my class name that I introduced yesterday and that fixed the issue (the original issue still exists, it's just that this issue I introduced yesterday was causing point 3 and 4 to happen from the above comment)
But now I have another issue
gh....
./gradlew assemble my lint.jar gets generated successfully because I can see my lint error after a clean. But when I run ./gradlew lintDebug on my prod app I get
```
> Configure project :app
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
> Task :customView1:lintDebug
Wrote HTML report to file:///Users/coltonidle/project/myapp/customView1/build/reports/lint-results-debug.html
Wrote XML report to file:///Users/coltonidle/project/myapp/customView1/build/reports/lint-results-debug.xml
> Task :customView2:lintDebug
Wrote HTML report to file:///Users/coltonidle/project/myapp/customView2/build/reports/lint-results-debug.html
Wrote XML report to file:///Users/coltonidle/project/myapp/customView2/build/reports/lint-results-debug.xml
> Task :customView3:lintDebug
Wrote HTML report to file:///Users/coltonidle/project/myapp/customView3/build/reports/lint-results-debug.html
Wrote XML report to file:///Users/coltonidle/project/myapp/customView3/build/reports/lint-results-debug.xml
BUILD SUCCESSFUL in 22s
app results are still no where to be found.
so...@google.com <so...@google.com> #7
Looks like the issue is back? I can't seem to get my lint errors to appear. I gave up for a while on my custom lint checks after verifying that ./gradlew asemble was indeed generating the lint jar, but now in AS 4.0 Beta 3, if I run assemble I don't see any of my checks.
=(
lb...@gmail.com <lb...@gmail.com> #8
agp 4.1.0-alpha04
lint 27.1.0-alpha04
I did a clean. All of my custom lint checks in my xml layout went away, as expected
Scenarios I tried to bring my checks back:
1. hit the build button (hammer) and none of my lint checks are there, this is what I really want fixed
2. hit cmd shift a, "make project" and none of my lint checks are there, this is what I really want fixed
( I typically was using "make project" because that's what the lint video from ADS shows.
3. ./gradlew assembleDebug still no lint checks, , this is what I really want fixed
4. ./gradlew :app-lint:assemble still no lint checks, , this sounds like it should be fixed
5. ./gradlew lintDebug lint checks aren't even generated for my app module. Refer to #6. This is still happening, but could be a different issue
6. Ran clean again, then ./gradlew assemble, lint checks are still not there.
Please help! I can't generate my lint jar, making all of my custom lint checks worthless!
so...@google.com <so...@google.com> #9
Lint is not able to recognize any rules around third-party custom lint checks. It fails with the message: "Error: Unknown issue id ..."
In our specific scenario, we rely on MParticle, and given that our app has a bunch of modules, lint complains about this specific rule (
lb...@gmail.com <lb...@gmail.com> #10
As per the ticket that was opened I'm trying
- `./gradlew assemble`
- `./gradlew lintDebug`
(which is already problematic because the build/run button in AS used to init your lint checks in the IDE.)
./gradlew assemble doesn't work for me
./gradlew lintDebug doesn't work for me, BUT I have a build variant and if I call lintPaidDebug then the lint checks do show up in the IDE.
Just to clarify. Please fix the regression of the build/run button in the IDE not generating/showing custom lint checks in the IDE. This has been broken for months and makes my lint checks useless since my team doesn't have CI in place we adhere to lint checks in the IDE.
so...@google.com <so...@google.com> #11
In the latest canary + AGP (8)
It seems like the workaround is now even completely broken. Running ./gradlew lintPaidDebug in AS 4.1 Canary 7 + agp 4.1.0-alpha07 + lint 27.1.0-alpha07 works, but moving to AS 4.1 Canary 8 + agp 4.1.0-alpha08 + lint 27.1.0-alpha08 makes it not work, and then if I rollback to AS 4.1 Canary 7 + agp 4.1.0-alpha07 + lint 27.1.0-alpha07 then everything works again.
lb...@gmail.com <lb...@gmail.com> #12
so...@google.com <so...@google.com> #13
which is not accessible. Could it be made public?
On Mon, May 4, 2020 at 9:32 PM <buganizer-system@google.com> wrote:
lb...@gmail.com <lb...@gmail.com> #14
In 4.1, "Make Project" should now again make the lint checks and make them available to Lint. This is because we stop "preparing" them (which is fancy word for moving them somewhere to be consumed).
However, deploying the app will not build the lint checks. We want this action to be exclusively focused on deploying the app and we don't want to do extra build actions.
Right now you can manually trigger building the lint checks via the Build
> Run Generate Source Gradle tasks
menu action. This is not a great place for it but it's a good temp work around.
In 4.2 we will create a custom action to rebuild just the lint checks. I have created
so...@google.com <so...@google.com>
so...@google.com <so...@google.com> #15
(Note that you can assign a keyboard shortcut to that action.)
so...@google.com <so...@google.com> #16
lb...@gmail.com <lb...@gmail.com> #17
Xav's fixes will be included in 4.1 Canary 11 (canary 9 is still the current version; we're testing canary 10 at the moment but these fixes went in after the cutoff for that build).
Description
/gradle/wrapper
Maybe even :
/.idea
The wrapper gets downloaded by the IDE anyway based on the configurations. Not sure about the other one though, but I've noticed it might sometimes have issues when importing a project , so I sometimes have to delete this folder.