Fixed
Status Update
Comments
ar...@appspot.gserviceaccount.com <ar...@appspot.gserviceaccount.com> #2
I had started to work on a CL that (maybe) fixed some of this, but never finished it. I'll take a look.
ma...@google.com <ma...@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(?)
ll...@google.com <ll...@google.com> #4
More points to make!
1. I typically was using "make project" because that's what the lint video from ADS shows.https://youtu.be/ffH-LD5uP4s?t=1140
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!
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!
gb...@google.com <gb...@google.com> #5
> Other notes: I think this is technically a regression, because Lint checks are prepared during `generateDebugSources` and that used to run during Gradle sync(?)
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?
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?
gb...@google.com <gb...@google.com> #6
In regards to my point 4
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 projecthttps://github.com/ColtonIdle/CustomLintChecksDoNotWork
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....google.com when I run
./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.
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.
bu...@chops-service-accounts.iam.gserviceaccount.com <bu...@chops-service-accounts.iam.gserviceaccount.com> #7
#3 @gh...@google.com
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.
=(
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.
=(
bu...@chops-service-accounts.iam.gserviceaccount.com <bu...@chops-service-accounts.iam.gserviceaccount.com> #8
I had the incorrect lint artifact. So I'm in AS 4.1 canary 4 and I'm retrying everything again.
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.
https://youtu.be/ffH-LD5uP4s?t=1140 )
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!
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!
bu...@chops-service-accounts.iam.gserviceaccount.com <bu...@chops-service-accounts.iam.gserviceaccount.com> #9
Same happening here.
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 (https://github.com/mParticle/mparticle-android-sdk/blob/master/tooling/custom-lint-rules/src/main/java/com/mparticle/lints/detectors/MPApiDetectorKt.kt ) for each of them, which becomes really painful because we need to add a lint-baseline on each module in order to ignore the issue.
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 (
bu...@chops-service-accounts.iam.gserviceaccount.com <bu...@chops-service-accounts.iam.gserviceaccount.com> #10
So I've been able to get it to work in the newest AS 4.1 Canary 5, but it requires jumping through some hoops.
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.
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.
gb...@google.com <gb...@google.com> #11
gh...@google.com
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.
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.
Description
Chrome Version: generic
OS: generic Linux, for cast platforms
Be able to cross compile rust projects for cast platforms using cros toolchains. Need to have rust runtime libraries as well.
e.g.
"rustc --print target-list" could have "aarch64-cros-linux-gnu" and "armv7a-cros-linux-gnueabihf" support. (release version of rustc cannot insert customized targets, we can accept customized rustc.)
rust runtime libraries could be based on selected glibc runtime libraries. e.g. "2.27-r12"