-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
refactor: unify target resolution for devices & emulators #1101
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1101 +/- ##
==========================================
- Coverage 71.19% 70.59% -0.60%
==========================================
Files 21 20 -1
Lines 1739 1714 -25
==========================================
- Hits 1238 1210 -28
- Misses 501 504 +3
Continue to review full report at Codecov.
|
64cd882
to
b7bd688
Compare
…ices & emulators (apache#1101)
b7bd688
to
01c0bfd
Compare
…ices & emulators (apache#1101)
01c0bfd
to
bcc74b1
Compare
bcc74b1
to
d0d5141
Compare
Converted to draft until the PRs that this one depends on are merged (commits marked as |
0c62cd6
to
5a816d0
Compare
5a816d0
to
0e8da4f
Compare
@raphinesse From a quick run test, I see a subtle difference. I haven't covered all cases but here is one example: When running the command The Main Branch Ending Printout:
This PR's Ending Printout:
As seen, the warning message I suspect a refactor shouldn't lose warning messages. I think improvements in visuals, such as spacing, on the other hand, are acceptable. A bonus from your PR is that it launches the emulator when the target is not provided. The main branch fails to launch even though the warning said it would launch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After testing and communicating over the changes, it was decided to be acceptable and safe for a minor release.
Everything still performs the same except for the warning message printout, which is not necessary and also fixed an issue.
* refactor: unify target resolution for devices & emulators * fix: use unified target methods in platform-centric bins
Motivation and Context
This change simplifies and deduplicates the code that, given a user-supplied target specification, finds a target to install and run an app on.
This refactoring was triggered by my ongoing work to stop copying
cordova/lib
to the platform folder.Description
device.list
andemulator.list_started
withtarget.list
{device, emulator}.resolveTarget
with the part of the target resolution that was implemented in therun
module to form the new methodtarget.resolve
.Testing
Updated unit tests pass.