Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Fix the local-only lint errors due to an unexpected GeneratedPluginRegistrant.java #50795

Merged
merged 5 commits into from
Feb 21, 2024

Conversation

matanlurey
Copy link
Contributor

Remove android/**/GeneratedPluginRegistrant.java from the global .gitignore.

This file should never exist in the source tree, locally or on CI, and it existing/being hidden causes lint errors.

Background

Here is what we think happens:

  • Someone opens $ENGINE/src/flutter/testing/scenario_app in VS Code
  • VS Code picks this up as a "Flutter package", running flutter packages get
  • The Flutter tool generates ../GeneratedPluginRegistrant.java, thinking this is a Flutter app
  • The lint error fails on GeneratedPluginRegistrant
$ ninja -j100 -C out/android_debug_unopt_arm64/
FAILED: scenario_app/reports/lint-results.xml 
vpython3 ../../flutter/testing/rules/run_gradle.py /Users/aaclarke/dev/engine/src/flutter/testing/scenario_app/android lint --no-daemon -Pflutter_jar=/Users/aaclarke/dev/engine/src/out/android_debug_unopt_arm64/flutter.jar -Pout_dir=/Users/aaclarke/dev/engine/src/out/android_debug_unopt_arm64/scenario_app --project-cache-dir=/Users/aaclarke/dev/engine/src/out/android_debug_unopt_arm64/scenario_app/.gradle --gradle-user-home=/Users/aaclarke/dev/engine/src/out/android_debug_unopt_arm64/scenario_app/.gradle

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintDebug'.
>                 Lint found errors in the project; aborting build.
  
                  Fix the issues identified by lint, or create a baseline to see only new errors:
                  '''
                  android {
                      lint {
                          baseline = file("lint-baseline.xml")
                      }
                  }
                  '''
  
                  For more details, see https://developer.android.com/studio/write/lint#snapshot
  
                  Lint found 1 errors, 0 warnings. First failure:

/cc @christopherfujino for any other theories.

@reidbaker
Copy link
Contributor

I dont think we want to remove this from gitignore. If there is a GeneratedPluginRegistrant.java then it should not be checked in. I think a better solution would be to modify the version of clean for whatever the engine build system uses to delete that class of file.

@matanlurey
Copy link
Contributor Author

I dont think we want to remove this from gitignore. If there is a GeneratedPluginRegistrant.java then it should not be checked in. I think a better solution would be to modify the version of clean for whatever the engine build system uses to delete that class of file.

This is intentional, as gitignore hides the fact this file should not ever exist.

It's not a matter of not wanting to be checked-in, it's literally an invalid file in the engine repository.

@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 21, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 21, 2024
Copy link
Contributor

auto-submit bot commented Feb 21, 2024

auto label is removed for flutter/engine/50795, due to - The status or check suite Linux Framework Smoke Tests has failed. Please fix the issues identified (or deflake) before re-applying this label.

Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matanlurey matanlurey merged commit 8e1406f into flutter:main Feb 21, 2024
@matanlurey matanlurey deleted the scenario-lint-build branch February 21, 2024 17:58
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 21, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 21, 2024
…143875)

flutter/engine@52ffcaa...bf5c003

2024-02-21 skia-flutter-autoroll@skia.org Roll Skia from 9d86359b5fe8 to 8fa858855820 (15 revisions) (flutter/engine#50827)
2024-02-21 matanlurey@users.noreply.github.com Add the `scenario_app` `'solid_blue'` golden to the Android test suite (flutter/engine#50801)
2024-02-21 matanlurey@users.noreply.github.com Ignore EOF newline characters and added tests to `dir_contents_diff` tool (flutter/engine#50805)
2024-02-21 jason-simmons@users.noreply.github.com Make the GL context current in EmbedderSurfaceGLImpeller before creating the GPU surface (flutter/engine#50807)
2024-02-21 matanlurey@users.noreply.github.com Fail engine post-submit on skia-gold comparions. (flutter/engine#50826)
2024-02-21 34871572+gmackall@users.noreply.github.com Remove WindowManager reflection in SingleViewPresentation.java (flutter/engine#49996)
2024-02-21 30870216+gaaclarke@users.noreply.github.com [Impeller] applied the lerp hack to blur (roughly 2x speedup?) (flutter/engine#50790)
2024-02-21 jason-simmons@users.noreply.github.com Migrate the Fuchsia embedder to the Dart_RecordTimelineEvent API (flutter/engine#50823)
2024-02-21 john@johnmccutchan.com Hook ImageReaderSurfaceProducer to the onTrimMemory listener interface (flutter/engine#50792)
2024-02-21 matanlurey@users.noreply.github.com Fix the local-only lint errors due to an unexpected `GeneratedPluginRegistrant.java` (flutter/engine#50795)
2024-02-21 jonahwilliams@google.com [Impeller] cache onscreen render targets. (flutter/engine#50751)
2024-02-21 zanderso@users.noreply.github.com Use 'et format' in CI. Check formatting of all files in CI (flutter/engine#50810)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants