Skip to content

Pass multidex flag when using --machine mode#99010

Closed
DanTup wants to merge 1 commit intoflutter:masterfrom
DanTup:fix-multidex-machine
Closed

Pass multidex flag when using --machine mode#99010
DanTup wants to merge 1 commit intoflutter:masterfrom
DanTup:fix-multidex-machine

Conversation

@DanTup
Copy link
Contributor

@DanTup DanTup commented Feb 23, 2022

This fixes Dart-Code/Dart-Code#3837 by ensuring the --[no-]multidex value (and default) are honoured when using --machine.

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.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@goderbauer goderbauer added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 23, 2022
@DanTup
Copy link
Contributor Author

DanTup commented Mar 3, 2022

@christopherfujino any suggestions on the best way to write tests for this?

@christopherfujino
Copy link
Contributor

I think I want to verify that the call to FakeDevice.startApp() was passed platformArgs that contain a multidex bool, or that the Runner's startApp() was called with multidexEnabled: true/false, but I've not been able to set this up well enough to check that (RunCommand creates Daemon and calls appDomain startApp() which creates a HotRunner).

I think I probably want to add a HotRunnerFactory to AppDomain (similar to the attach test has) but since all the classes in between are constructed directly by calling their constructors, I think it'll mean changing a bunch of things in between I was hoping for a second opinion!

Sorry, I don't have a better idea than this. @GaryQian do you have any ideas?

@DanTup
Copy link
Contributor Author

DanTup commented Mar 16, 2022

@GaryQian any thoughts on the above? :)

@DanTup
Copy link
Contributor Author

DanTup commented Apr 6, 2022

I had to re-create my fork to fix a dependabot bug which closed this, but I'm still interested in this. I believe this change fixes the issue being reported at Dart-Code/Dart-Code#3837, but I don't know of a reliable way to test these parts of the code (specifically, testing the command line flag makes it down into these classes).

@DanTup DanTup reopened this Apr 6, 2022
@christopherfujino
Copy link
Contributor

@GaryQian can you take a look at this and how Danny can test it?

@GaryQian
Copy link
Contributor

GaryQian commented Apr 6, 2022

Hey sorry for being slow on the reply. The question being asked is primarily within the domain of tooling testing, and unfortunately I don't have too much insight on the best way to test it. The fix itself for passing the multidex flag LGTM though.

My testing for the multidex feature was primarily end-to-end integration tests and unit testing particular methods.

@DanTup
Copy link
Contributor Author

DanTup commented Apr 11, 2022

Apparently re-creating my fork disconnected this PR from it. I've re-raised this at #101689.

@DanTup DanTup closed this Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

argument "--machine" disables "--multidex"

4 participants