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

Issue 23249004: Remove dependency on the Path class from dart:io (Closed)

Created:
7 years, 4 months ago by Søren Gjesse
Modified:
7 years, 3 months ago
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/dart-protoc-plugin.git@master
Visibility:
Public.

Description

Remove dependency on the Path class from dart:io The Path class was removed from dart:io in Dart r26191. With this change URIs are used to manipulate paths instead. R=ajohnsen@google.com BUG= Committed: https://github.com/dart-lang/protoc-plugin/commit/a39b073

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressed review comments #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -13 lines) Patch
M lib/file_generator.dart View 1 3 chunks +66 lines, -13 lines 11 comments Download

Messages

Total messages: 9 (0 generated)
Søren Gjesse
7 years, 4 months ago (2013-08-16 09:35:22 UTC) #1
Søren Gjesse
Hi Anders, Could you take a look (Anton is OOO)? I will move the relative ...
7 years, 4 months ago (2013-08-19 06:55:36 UTC) #2
Anders Johnsen
lgtm https://codereview.chromium.org/23249004/diff/1/lib/file_generator.dart File lib/file_generator.dart (right): https://codereview.chromium.org/23249004/diff/1/lib/file_generator.dart#newcode58 lib/file_generator.dart:58: List<String> pathSegments = target.pathSegments; pathSegments.sublist(0, pathSegments.length - 1) ...
7 years, 4 months ago (2013-08-19 07:17:47 UTC) #3
Søren Gjesse
Thanks https://codereview.chromium.org/23249004/diff/1/lib/file_generator.dart File lib/file_generator.dart (right): https://codereview.chromium.org/23249004/diff/1/lib/file_generator.dart#newcode58 lib/file_generator.dart:58: List<String> pathSegments = target.pathSegments; On 2013/08/19 07:17:47, Anders ...
7 years, 4 months ago (2013-08-19 07:35:42 UTC) #4
Søren Gjesse
Committed patchset #2 manually as ra39b073 (presubmit successful).
7 years, 4 months ago (2013-08-19 07:41:45 UTC) #5
Siggi Cherem (dart-lang)
lgtm, just have a couple questions/comments which I'm not sure about. https://chromiumcodereview.appspot.com/23249004/diff/8001/lib/file_generator.dart File lib/file_generator.dart (right): ...
7 years, 4 months ago (2013-08-19 16:44:47 UTC) #6
Søren Gjesse
https://chromiumcodereview.appspot.com/23249004/diff/8001/lib/file_generator.dart File lib/file_generator.dart (right): https://chromiumcodereview.appspot.com/23249004/diff/8001/lib/file_generator.dart#newcode54 lib/file_generator.dart:54: Uri _relative(Uri target, Uri base) { On 2013/08/19 16:44:48, ...
7 years, 4 months ago (2013-08-20 07:35:33 UTC) #7
Siggi Cherem (dart-lang)
thanks! https://chromiumcodereview.appspot.com/23249004/diff/8001/lib/file_generator.dart File lib/file_generator.dart (right): https://chromiumcodereview.appspot.com/23249004/diff/8001/lib/file_generator.dart#newcode54 lib/file_generator.dart:54: Uri _relative(Uri target, Uri base) { On 2013/08/20 ...
7 years, 4 months ago (2013-08-20 17:42:48 UTC) #8
Anton Muhin
7 years, 3 months ago (2013-09-02 09:26:09 UTC) #9
Message was sent while issue was closed.
Sorry for late response, I've been on vacation.

Mostly minor issues, my main concern is with path normalization part, but
that'll be addressed in the lib if I understand it correctly, won't it?

https://chromiumcodereview.appspot.com/23249004/diff/8001/lib/file_generator....
File lib/file_generator.dart (right):

https://chromiumcodereview.appspot.com/23249004/diff/8001/lib/file_generator....
lib/file_generator.dart:45: var dartFileName =
_fileNameWithoutExtension(protoFilePath) + ".pb.dart";
nit: mix of ' and "

https://chromiumcodereview.appspot.com/23249004/diff/8001/lib/file_generator....
lib/file_generator.dart:45: var dartFileName =
_fileNameWithoutExtension(protoFilePath) + ".pb.dart";
nit: I'd rather use interpolation, but completely up to you

https://chromiumcodereview.appspot.com/23249004/diff/8001/lib/file_generator....
lib/file_generator.dart:56: List<String> baseSegments =
absolutely up to you, but I rather use new
List<String>.from(base.pathSegments)..removeLast()

https://chromiumcodereview.appspot.com/23249004/diff/8001/lib/file_generator....
lib/file_generator.dart:59: if (baseSegments.length == 1 && baseSegments[0] ==
'.') {
what if baseSegments is [ '.', '.', '.' ] or alike?  overall, is path
normalization in this code good enough?

https://chromiumcodereview.appspot.com/23249004/diff/8001/lib/file_generator....
lib/file_generator.dart:125: throw("FAILURE: Import with absolute path is not
supported");
nit: mix of ' and "

Powered by Google App Engine
This is Rietveld 408576698