Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[tool] ⚡️ Install the corresponding APK in flutter run #112768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 18, 2022

Conversation

AlexV525
Copy link
Member

@AlexV525 AlexV525 commented Oct 2, 2022

Fix #111585. The PR makes the tool installs exactly the generated APK file, which corrects the console's output too. Also, SHA1 will be generated for all generated APKs in the batch.

Filename comparison (DEBUG Mode)

Install APK file Before After
No flavor app.apk app-debug.apk
Flavor configured app.apk app-flavor-debug.apk

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Oct 2, 2022
@AlexV525 AlexV525 marked this pull request as ready for review October 3, 2022 17:07
@AlexV525 AlexV525 changed the title [tool] 🐛 Produce more precise filename for the installing APK [tool] ⚡️ Install the corresponding APK in flutter run Oct 4, 2022
@christopherfujino christopherfujino requested review from christopherfujino and removed request for jonahwilliams October 6, 2022 20:43
Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

This looks like the correct fix to make, I'll defer final approval to @GaryQian though.

@AlexV525
Copy link
Member Author

I'm not sure if any external tools are using app.apk in their usages, that's the only thing I'm concerning.

@GaryQian
Copy link
Contributor

GaryQian commented Oct 17, 2022

It's likely that there are tools depending on the app.apk copy. It may be reasonable for backwards compatibility to continue copying the first apk and deprecate the usage of the copy. We can add a TODO and phase it out later.

Otherwise, the change looks good!

@AlexV525
Copy link
Member Author

https://github.com/flutter/flutter/pull/112768/checks?check_run_id=8940587074 The failure doesn't seem to be related.

Copy link
Contributor

@GaryQian GaryQian left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks!

@GaryQian GaryQian added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 18, 2022
@auto-submit auto-submit bot merged commit 0ad71e8 into flutter:master Oct 18, 2022
@AlexV525 AlexV525 deleted the correct-installing-apk-filename branch October 18, 2022 02:39
@AlexV525
Copy link
Member Author

It may be reasonable for backwards compatibility to continue copying the first apk and deprecate the usage of the copy.

It's unclear how to deprecate a usage like this. The tool itself is not using the file at present, and other tools won't access the file through flutter_tools, so we can't raise a deprecate message for it.

@christopherfujino
Copy link
Contributor

It may be reasonable for backwards compatibility to continue copying the first apk and deprecate the usage of the copy.

It's unclear how to deprecate a usage like this. The tool itself is not using the file at present, and other tools won't access the file through flutter_tools, so we can't raise a deprecate message for it.

Agreed, not sure what we can do other than stop creating it and see what breaks.

@godofredoc godofredoc added revert Autorevert PR (with "Reason for revert:" comment) and removed revert Autorevert PR (with "Reason for revert:" comment) labels Oct 18, 2022
godofredoc added a commit that referenced this pull request Oct 18, 2022
@godofredoc
Copy link
Contributor

This PR has been reverted because is blocking the tree. \cc @christopherfujino @AlexV525

@AlexV525
Copy link
Member Author

AlexV525 commented Oct 18, 2022

OK so in the next PR I think we should try to remove the copy and continue to track if any breaks.

@AlexV525
Copy link
Member Author

@christopherfujino @gspencergoog Could you help me with dumping the tests log? I can't access to the tree's dashboard due to my network issues currently, or maybe a tracking issue. Thanks!

@christopherfujino
Copy link
Contributor

@christopherfujino @gspencergoog Could you help me with dumping the tests log? I can't access to the tree's dashboard due to my network issues currently, or maybe a tracking issue. Thanks!

I will open a tracking issue and link from here

@christopherfujino
Copy link
Contributor

@AlexV525 looks like an easy fix #113620

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[tool] flutter run runs only app.apk
4 participants