Status Update
Comments
si...@gmail.com <si...@gmail.com> #2
ga...@google.com <ga...@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(?)
si...@gmail.com <si...@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!
si...@gmail.com <si...@gmail.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?
la...@benkophone.com <la...@benkophone.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.
ga...@google.com <ga...@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.
=(
ga...@google.com <ga...@google.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!
kg...@gmail.com <kg...@gmail.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 (
la...@benkophone.com <la...@benkophone.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.
ia...@google.com <ia...@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.
la...@benkophone.com <la...@benkophone.com> #12
la...@benkophone.com <la...@benkophone.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:
ia...@google.com <ia...@google.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
la...@benkophone.com <la...@benkophone.com> #15
(Note that you can assign a keyboard shortcut to that action.)
ia...@google.com <ia...@google.com> #16
la...@benkophone.com <la...@benkophone.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).
ia...@google.com <ia...@google.com> #18
In general though, as long as my teams custom lint checks "just work" in a normal workflow (clone source from git, clean + run) then we should be all good. Maybe I'm missing something, but it sounds like there will probably still be some extra step that my team unfortunately has to remember to do. I wish I could have my lint checks just be as high of a priority as the default lint checks. Or else, what's the point of writing custom lint checks if the developer can't catch the issues while writing the code (like the default android lint checks)
la...@benkophone.com <la...@benkophone.com> #19
Yes there will be some extra steps.
We could do a post sync/project open action to build theses in the background, but it's going to be hard to fully automate this I think. It would be nice to just rebuild them as they change, but I think we really don't want to make building them part of the deploy build.
Maybe a notification bubble that lint checks seems to be out of sync and a nudge to rebuild them? Tor, what do you think?
[Deleted User] <[Deleted User]> #20
Please let me know if you think our flow of using custom lint checks is wrong, we're a small team (6 people) and so this makes sense for us. I've started my own personal projects and added a custom-lint module as well and it's just crazy to me how it doesn't work. Maybe a gentle reminder in the IDE would really be best? It would at least also solve the issue of what happens when you update the lint check and you don't know how to rebuild and reapply to your project. In order for our team to keep creating lint checks and keep adhering to lint checks, we just want to jump through as little hoops as possible and without shooting ourselves in the foot. Currently we're doing both of those things (jumping through hoops + shooting ourselves in the foot). Right now it feels like someone really has to be an expert on lint to know how to build the checks and then apply them.
We will try again on Canary 11, but I would really appreciate any gentle nudge you can give developers to make sure they are actually applying their custom lint checks.
la...@benkophone.com <la...@benkophone.com> #21
IMO, readying Lint checks seems sensible to do upon sync. It should be fast since building those modules will often be up-to-date, and syncing is already what many people consider to be the "make my IDE understand the project" button, the IDE's behavior is directly affected by lint checks.
Description
First, please search through existing issues to ensure that the bug has not already been reported. You can start the search here:
If the issue has already been reported, you can click the star next to the issue number to subscribe and receive updates. We prioritize responding to the issues with the most stars. You can also comment on the issue to provide any details of your experience with it.
If your issue has not been reported, please provide all of the following:
-----------------------------------------------------------------------------------------------------------------------------
A short description of the issue:
When the V8 runtime is enabled, the method:
ScriptApp.getService().getUrl()
returns the "dev" URL for a published web app.
A small code sample that reliably reproduces the issue. The sample should run as-is or with minimal setup, without external dependencies.
ScriptApp.getService().getUrl()
What steps will reproduce the problem?
1. Create a Google Sheet
2. Open the Script editor and deploy/publish as web app
3. Run ScriptApp.getService().getUrl()
If you first disable the V8 runtime the URL will be /exec/ but if you don't first disable the V8 runtime, the URL will be /dev/
What is the expected output? What do you see instead? If you see error messages, please provide them.
Expect to see the published web app URL that ends with /exec/
Instead see the dev URL ending with /dev/
Please provide any additional information below.