Skip to content

Send an event at startup with the protocol version and pid - #17873

Merged
DanTup merged 2 commits into
flutter:masterfrom
DanTup:deamon-startup-event
May 28, 2018
Merged

DanTup merged 2 commits into
flutter:masterfrom
DanTup:deamon-startup-event

Conversation

@DanTup

@DanTup DanTup commented May 24, 2018

Copy link
Copy Markdown
Contributor

The pid will help with some of the issues of terminate the process when launched through a shell script and the version will allow clients to make decisions about supported features.

I've also bumped the protocol version number for two reasons:

  1. This change
  2. We didn't increase it when we added the previous emulator commands

This event appears both when running flutter daemon and flutter run --machine.

@devoncarew I called it daemon.connected because the analysis server already used the name connected for a similar event and it seemed consistent, but shout if you want me to change it.

(I'll update the wiki page once this is agreed/approved too - I presume those changes are instant and can't go in a PR?).

@devoncarew

Copy link
Copy Markdown
Contributor

code lgtm

It looks like there are test failures based on the unit tests not expecting the new, initial event.

Re: updating the protocol docs, doing that after that lands sgtm. We could also (after this PR) move the docs to a markdown file in the repo, and update the wiki to point to that doc. That would allos us to do atomic changes of the protocol and its docs.

@DanTup

DanTup commented May 24, 2018

Copy link
Copy Markdown
Contributor Author

It looks like there are test failures based on the unit tests not expecting the new, initial event.

I'll take a look. I wasn't sure how to reliably run all of the tests so I figured my friend Travis would help :)

We could also (after this PR) move the docs to a markdown file in the repo

Yeah, that sounds good to me. I'll take a look once this PR is good to go.

@devoncarew devoncarew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm w/ green bots

@DanTup

DanTup commented May 24, 2018

Copy link
Copy Markdown
Contributor Author

There are still some weird failures on Travis, like this:

05:46 +344 ~1 -3: test/devfs_test.dart: devfs remote cleanup preexisting file system [E]
  Expected: equals ['create test'] unordered
    Actual: [
              'writeFile test .packages',
              'writeFile test lib/foo.txt',
              'create test',
              'destroy test',
              'create test'
            ]
     Which: has too many elements (5 > 1)
  
  package:test                                         expect
  test/src/mocks.dart 384:5                            BasicMock.expectMessages
  test/devfs_test.dart 356:17                          main.<fn>.<fn>

Doesn't seem like something I could've caused, but I'll do some digging next week before landing this.

@DanTup

DanTup commented May 28, 2018

Copy link
Copy Markdown
Contributor Author

Re-reading the logs, I think the devfs failures are as a result of a timeout:

Test timed out after 30 seconds

I think the subsequent tests failed because the test that timed out didn't clean up properly. The tests seem to pass locally for me.

I've rebased on master which is forcing the tests to run again, so if they all pass this time I'll land this.

DanTup added 2 commits May 28, 2018 13:59
The pid will help with some of the issues of terminate the process when launched through a shell script and the version will allow clients to make decisions about supported features.

I've also bumped the protocol version number for two reasons:

1. This change
2. We didn't increase it when we added the previous emulator commands
@DanTup
DanTup merged commit 24e2b23 into flutter:master May 28, 2018
@DanTup
DanTup deleted the deamon-startup-event branch May 28, 2018 21:02
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 10, 2021
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