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

Disallow files additional named GeneratedPluginRegistrant.java. #50796

Merged
merged 10 commits into from
Feb 21, 2024

Conversation

matanlurey
Copy link
Contributor

Closes flutter/flutter#143782.

Also introduces a test that the test itself passes.

I considered adding this to ci/analyze.sh, but it seems better suited for ci/format.sh (which is also on git-hooks). Wdut?

ci/format.sh Outdated
@@ -18,7 +18,7 @@ unset CDPATH
function follow_links() (
cd -P "$(dirname -- "$1")"
file="$PWD/$(basename -- "$1")"
while [[ -h "$file" ]]; do
while [[ -L "$file" ]]; do
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding a comment explaining what -L "$file" means.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just reverted it, that was a mistake.


# Creates a file named `GeneratedPluginRegistrant.java` in the project.
# This file is generated by Flutter tooling and should not be checked in.
touch "$FLUTTER_DIR/GeneratedPluginRegistrant.java"
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional: Consider putting this in a subdirectory given that this file would likely be deeper in the file tree.

@@ -0,0 +1,55 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

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

That configuration causes this test to run in ci?

Copy link
Contributor

Choose a reason for hiding this comment

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

NVM, you added it in ci/builders/linux_unopt.json

ci/format.sh Outdated
GENERATED_PLUGIN_REGISTRANT_PATH=$(find "$SRC_DIR/flutter" -name "GeneratedPluginRegistrant.java")
if [[ -n "$GENERATED_PLUGIN_REGISTRANT_PATH" ]]; then
echo "GeneratedPluginRegistrant.java found in the project."
echo "This file is generated by Flutter tooling and should not be checked in."
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not just that it shouldn't be checked in, it should be present at all right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah better, changed!

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

Consider removing .gitignore entry that caused this file to get ignored in the first place

@matanlurey
Copy link
Contributor Author

Consider removing .gitignore entry that caused this file to get ignored in the first place

I already sent you #50795 😅

@@ -0,0 +1,55 @@
#!/bin/bash
Copy link
Member

Choose a reason for hiding this comment

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

Does this script have the execute bit set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, I just typed it wrong in the CI configuration. PTAL.

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

auto-submit bot commented Feb 20, 2024

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

  • The status or check suite Linux Framework Smoke Tests has failed. Please fix the issues identified (or deflake) before re-applying this label.

@matanlurey matanlurey changed the title Rename and disallow files named GeneratedPluginRegistrant.java. Disallow files additional named GeneratedPluginRegistrant.java. Feb 21, 2024
@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 21, 2024
@auto-submit auto-submit bot merged commit 4128895 into flutter:main Feb 21, 2024
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
…143856)

flutter/engine@e16f43e...4128895

2024-02-21 matanlurey@users.noreply.github.com Disallow files additional named `GeneratedPluginRegistrant.java`. (flutter/engine#50796)

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
autosubmit Merge PR when tree becomes green via auto submit App platform-android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Certain files (such as android/**/GeneratedPluginRegistrant.java) should never exist
4 participants