Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Issue 12330062: Add a filesystem descriptor library to scheduled_test. (Closed)

Created:
7 years, 10 months ago by nweiz
Modified:
7 years, 10 months ago
Reviewers:
Bob Nystrom
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add a filesystem descriptor library to scheduled_test. BUG=8511 Committed: https://code.google.com/p/dart/source/detail?r=18928

Patch Set 1 #

Total comments: 52

Patch Set 2 : Code review changes #

Total comments: 8

Patch Set 3 : Code review changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1344 lines, -0 lines) Patch
A pkg/scheduled_test/lib/descriptor.dart View 1 1 chunk +98 lines, -0 lines 0 comments Download
A pkg/scheduled_test/lib/src/descriptor/directory.dart View 1 2 1 chunk +93 lines, -0 lines 0 comments Download
A pkg/scheduled_test/lib/src/descriptor/entry.dart View 1 2 1 chunk +66 lines, -0 lines 0 comments Download
A pkg/scheduled_test/lib/src/descriptor/file.dart View 1 2 1 chunk +107 lines, -0 lines 0 comments Download
A pkg/scheduled_test/lib/src/descriptor/utils.dart View 1 1 chunk +53 lines, -0 lines 0 comments Download
M pkg/scheduled_test/lib/src/utils.dart View 1 1 chunk +36 lines, -0 lines 0 comments Download
A pkg/scheduled_test/test/descriptor_test.dart View 1 2 1 chunk +891 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
nweiz
7 years, 10 months ago (2013-02-22 00:46:33 UTC) #1
Bob Nystrom
https://codereview.chromium.org/12330062/diff/1/pkg/scheduled_test/lib/descriptor.dart File pkg/scheduled_test/lib/descriptor.dart (right): https://codereview.chromium.org/12330062/diff/1/pkg/scheduled_test/lib/descriptor.dart#newcode49 pkg/scheduled_test/lib/descriptor.dart:49: /// return new Directory('').createTemp().then((dir) { Seems like this is ...
7 years, 10 months ago (2013-02-22 17:58:21 UTC) #2
nweiz
https://codereview.chromium.org/12330062/diff/1/pkg/scheduled_test/lib/descriptor.dart File pkg/scheduled_test/lib/descriptor.dart (right): https://codereview.chromium.org/12330062/diff/1/pkg/scheduled_test/lib/descriptor.dart#newcode49 pkg/scheduled_test/lib/descriptor.dart:49: /// return new Directory('').createTemp().then((dir) { On 2013/02/22 17:58:21, Bob ...
7 years, 10 months ago (2013-02-22 20:57:20 UTC) #3
Bob Nystrom
LGTM, though I'd rather not see load() in Entry. https://codereview.chromium.org/12330062/diff/1/pkg/scheduled_test/lib/descriptor.dart File pkg/scheduled_test/lib/descriptor.dart (right): https://codereview.chromium.org/12330062/diff/1/pkg/scheduled_test/lib/descriptor.dart#newcode49 pkg/scheduled_test/lib/descriptor.dart:49: ...
7 years, 10 months ago (2013-02-22 22:08:56 UTC) #4
nweiz
Committed patchset #3 manually as r18928 (presubmit successful).
7 years, 10 months ago (2013-02-22 23:02:07 UTC) #5
nweiz
7 years, 10 months ago (2013-02-22 23:05:21 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/12330062/diff/1/pkg/scheduled_test/lib/descri...
File pkg/scheduled_test/lib/descriptor.dart (right):

https://codereview.chromium.org/12330062/diff/1/pkg/scheduled_test/lib/descri...
pkg/scheduled_test/lib/descriptor.dart:49: ///           return new
Directory('').createTemp().then((dir) {
On 2013/02/22 22:08:57, Bob Nystrom wrote:
> On 2013/02/22 20:57:20, nweiz wrote:
> > There's no way for a library to register a setUp
> > function, so it would have to lazily run when the user first creates a
> > descriptor.
> 
> Could schedule() do that eagerly?

It's a Dart constraint, not a unittest constraint. There's no way for a library
being imported to cause any code to be run, including code that would register
this sort of callback.

https://codereview.chromium.org/12330062/diff/3003/pkg/scheduled_test/lib/src...
File pkg/scheduled_test/lib/src/descriptor/directory.dart (right):

https://codereview.chromium.org/12330062/diff/3003/pkg/scheduled_test/lib/src...
pkg/scheduled_test/lib/src/descriptor/directory.dart:72: Stream<List<int>>
read() => errorStream("Can't load the contents of "
On 2013/02/22 22:08:57, Bob Nystrom wrote:
> "load" -> "read"

Done.

https://codereview.chromium.org/12330062/diff/3003/pkg/scheduled_test/lib/src...
File pkg/scheduled_test/lib/src/descriptor/entry.dart (right):

https://codereview.chromium.org/12330062/diff/3003/pkg/scheduled_test/lib/src...
pkg/scheduled_test/lib/src/descriptor/entry.dart:38: /// contents of the entry
at [path]. This only works if [this] is a directory
On 2013/02/22 22:08:57, Bob Nystrom wrote:
> "entry at [path]" -> "child entry located at [path]"

Done.

https://codereview.chromium.org/12330062/diff/3003/pkg/scheduled_test/lib/src...
pkg/scheduled_test/lib/src/descriptor/entry.dart:39: /// entry. This operation
is not [schedule]d.
On 2013/02/22 22:08:57, Bob Nystrom wrote:
> Given "This only works..." I still feel like there's no value in having this
on
> the Entry class. It's not like all subclasses of Entry are pure implementation
> that use the exact same interface. With Directory, there are some different
> capabilities too, and I think it's fine if the types reflect that.

That would make it impossible to write a class like FutureDescriptor that can
transparently wrap both Directory and File descriptors.

https://codereview.chromium.org/12330062/diff/3003/pkg/scheduled_test/lib/src...
File pkg/scheduled_test/lib/src/descriptor/file.dart (right):

https://codereview.chromium.org/12330062/diff/3003/pkg/scheduled_test/lib/src...
pkg/scheduled_test/lib/src/descriptor/file.dart:66: "'$pathToLoad' from within
$nameDescription: not a directory.");
On 2013/02/22 22:08:57, Bob Nystrom wrote:
> Given that Directory is the only type that will implement this, you may as
well
> move this implementation up to Entry so other types can inherit it.

Done.

Powered by Google App Engine
This is Rietveld 408576698