Skip to content

Conversation

@skybrian
Copy link
Contributor

@skybrian skybrian commented Jun 6, 2017

Currently this just prints the observatory URL as a JSON event.
Refactored the code to make this fit in.

@skybrian skybrian requested review from Hixie and devoncarew June 6, 2017 01:29
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: spaces around named arguments

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This contradicts dartfmt?

Copy link
Contributor

Choose a reason for hiding this comment

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

flutter repo doesn't adhere to dartfmt since it doesn't meet our needs. @Hixie has a list somewhere of all our wishes in a formatter...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Huh. Okay, but what special needs can there be for the flutter_tools package? So far it seems to be just regular Dart VM code.

@Hixie
Copy link
Contributor

Hixie commented Jun 6, 2017

@tvolkert would be a better reviewer.

@skybrian skybrian requested a review from tvolkert June 6, 2017 04:20
Copy link
Contributor

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

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

lgtm for my part w/ the indicated changes, but would also wait on Todd's review.

Copy link
Contributor

Choose a reason for hiding this comment

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

This file will need a copyright statement.

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'll use "Chromium Authors" to match the others, but wouldn't "Flutter Authors" be better?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

"Chromium Authors" is a legal term; I think we have some license deps to free ourselves of first before we can become the "Flutter Authors"... @sethladd would know the full story.

Copy link
Contributor

Choose a reason for hiding this comment

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

Name the 2nd arg params to parallel the map assignment below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

same re: copyright

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

file copyright

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

also, negatable: false?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@tvolkert tvolkert left a comment

Choose a reason for hiding this comment

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

Note: coverage doesn't run on Travis for PRs. The best way to make sure this doesn't introduce any regressions is to roll it locally into google's internal system and run all affected tests (the roll script supports pointing to a local repo).

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: format:

... runTests(
  Type1 arg1, {
  Type2 arg2,
  Type3 arg3,
}) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

No curly braces around single-line if statements

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

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 weird to test a boolean value for null, especially when it has a default value. Do you mean enableObservatory ?? false?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Huh. I must have copied that from somewhere else. Fixed.

Copy link
Contributor

Choose a reason for hiding this comment

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

This was originally added for coverage only, and I wanna make sure we're not conflating it with enableObservatory -- do we need this if startPaused is true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like it should make no difference, because for startPaused, you are only allowed to pass in one test file. (That is, asssuming that a test file corresponds to a "test suite" in package:test.)

Also, it seems like debugging concurrently running tests would be unnecessarily confusing?

Copy link
Contributor

Choose a reason for hiding this comment

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

No curly braces

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

No curly barces

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like coverage has been dropped - we need to pass collector.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Passed in as watcher.

Copy link
Contributor

Choose a reason for hiding this comment

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

You're no longer plumbing collector through

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is being plumbed through as watcher. (CoverageCollector now implements TestWatcher.)

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: no braces

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@devoncarew
Copy link
Contributor

(fyi, @skybrian is out for a few days - he likely won't revisit this PR until next week)

Currently this just prints the observatory URL as a JSON event.
Refactored the code to make this fit in.
@Hixie
Copy link
Contributor

Hixie commented Jun 12, 2017

I'm going to close this PR since @skybrian is out for a while. Please don't hesitate to reopen when it's ready for further review.

Copy link
Contributor

@tvolkert tvolkert left a comment

Choose a reason for hiding this comment

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

LGTM with comments

import '../base/io.dart' show Process;

/// Callbacks for reporting progress while running tests.
class TestWatcher {
Copy link
Contributor

Choose a reason for hiding this comment

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

abstract?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It could be, but technically it's okay to use the base class as a no-op implementation, so I'll leave it as is.

);

// Set the package path used for child processes.
// TODO: why is this global? Move to installHook?
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: format of TODO comments is TODO(username): ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. (I guess nobody knows the answer?)

await test.main(testArgs);

// test.main() sets dart:io's exitCode global.
// TODO: restore previous value?
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: format of TODO comments is TODO(username): ...

}

if (result != 0)
if (result != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: no braces

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@skybrian skybrian merged commit 3528cd6 into flutter:master Jun 13, 2017
@Hixie
Copy link
Contributor

Hixie commented Jun 13, 2017

For future archeologists: this broke coverage; fixes started in #10672.

@skybrian skybrian deleted the debug branch June 15, 2017 20:44
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 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.

5 participants