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

Issue 54203002: Update documentation on .fromEnvironment. Make bool default be false. (Closed)

Created:
7 years, 1 month ago by Lasse Reichstein Nielsen
Modified:
7 years, 1 month ago
Reviewers:
Søren Gjesse
CC:
reviews_dartlang.org, vm-dev_dartlang.org, iposva, ngeoffray, kasperl, floitsch
Visibility:
Public.

Description

Update documentation on .fromEnvironment. Make bool default be false. I want more text, and examples of usage, alternative usage, etc. R=sgjesse@google.com Committed: https://code.google.com/p/dart/source/detail?r=29657

Patch Set 1 #

Patch Set 2 : Added examples. #

Total comments: 6

Patch Set 3 : Fix test. Remove reference to throwing from int.fromEnvironment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -16 lines) Patch
M runtime/lib/bool_patch.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/lib/core_patch.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/core/bool.dart View 1 2 1 chunk +22 lines, -3 lines 0 comments Download
M sdk/lib/core/int.dart View 1 2 2 chunks +14 lines, -8 lines 0 comments Download
M sdk/lib/core/string.dart View 1 1 chunk +16 lines, -2 lines 0 comments Download
M tests/corelib/bool_from_environment_default_value_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
Lasse Reichstein Nielsen
7 years, 1 month ago (2013-10-31 07:18:04 UTC) #1
Søren Gjesse
lgtm, but the test tests/corelib/bool_from_environment_default_value_test.dart tests that the default defaultValue for bool.fromEnvironment is null, so ...
7 years, 1 month ago (2013-10-31 08:14:29 UTC) #2
Lasse Reichstein Nielsen
Committed patchset #3 manually as r29657 (presubmit successful).
7 years, 1 month ago (2013-10-31 09:33:26 UTC) #3
Lasse Reichstein Nielsen
7 years, 1 month ago (2013-10-31 11:52:19 UTC) #4
Message was sent while issue was closed.
https://codereview.chromium.org/54203002/diff/30001/runtime/lib/bool_patch.dart
File runtime/lib/bool_patch.dart (right):

https://codereview.chromium.org/54203002/diff/30001/runtime/lib/bool_patch.da...
runtime/lib/bool_patch.dart:10: {bool defaultValue = false})
You can, but you /should/ use the String constructor for that.

https://codereview.chromium.org/54203002/diff/30001/sdk/lib/core/bool.dart
File sdk/lib/core/bool.dart (right):

https://codereview.chromium.org/54203002/diff/30001/sdk/lib/core/bool.dart#ne...
sdk/lib/core/bool.dart:30: *    var useFlooFlag = const
bool.fromEnvironment("floo");
On 2013/10/31 08:14:30, Søren Gjesse wrote:
> Maybe write something more useful here, e.g floo -> logging

Done.

https://codereview.chromium.org/54203002/diff/30001/sdk/lib/core/int.dart
File sdk/lib/core/int.dart (right):

https://codereview.chromium.org/54203002/diff/30001/sdk/lib/core/int.dart#new...
sdk/lib/core/int.dart:26: * Throws a [FormatException] if the value in the
environment is not a valid
It also fails on other parts of the parsing. We should fix that.

Powered by Google App Engine
This is Rietveld 408576698