-
Notifications
You must be signed in to change notification settings - Fork 382
Enable null safety #472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable null safety #472
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,35 @@ | ||
language: dart | ||
|
||
dart: | ||
- dev | ||
- 2.4.0 | ||
- dev | ||
|
||
dart_task: | ||
- test: --platform vm,chrome | ||
- dartanalyzer: --fatal-infos --fatal-warnings . | ||
|
||
matrix: | ||
jobs: | ||
include: | ||
# Only validate formatting using the dev release | ||
- dart: dev | ||
dart_task: dartfmt | ||
- stage: analyze_and_format | ||
name: "Analyze" | ||
os: linux | ||
script: dartanalyzer --enable-experiment=non-nullable --fatal-warnings --fatal-infos . | ||
- stage: analyze_and_format | ||
name: "Format" | ||
os: linux | ||
script: dartfmt -n --set-exit-if-changed . | ||
- stage: test | ||
name: "Vm Tests" | ||
os: linux | ||
script: pub run --enable-experiment=non-nullable test -p vm | ||
- stage: test | ||
name: "Web Tests" | ||
os: linux | ||
script: pub run --enable-experiment=non-nullable test -p chrome | ||
|
||
stages: | ||
- analyze_and_format | ||
- test | ||
|
||
# Only building master means that we don't run two builds for each pull request. | ||
branches: | ||
only: [master] | ||
|
||
cache: | ||
directories: | ||
- $HOME/.pub-cache | ||
directories: | ||
- $HOME/.pub-cache |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,16 +52,17 @@ class BrowserClient extends BaseClient { | |
request.headers.forEach(xhr.setRequestHeader); | ||
|
||
var completer = Completer<StreamedResponse>(); | ||
|
||
// TODO(kevmoo): Waiting on https://github.com/dart-lang/linter/issues/2185 | ||
// ignore: void_checks | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here and below – not sure why we're getting this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will be worked around by googlearchive/pedantic#69 if we get that in. This issue looks like https://github.com/dart-lang/linter/issues/2185 I think we can keep the lint and point the todo at that issue. |
||
unawaited(xhr.onLoad.first.then((_) { | ||
// TODO(nweiz): Set the response type to "arraybuffer" when issue 18542 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This issue is now closed |
||
// is fixed. | ||
var blob = xhr.response as Blob ?? Blob([]); | ||
var blob = xhr.response as Blob; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to the annotations on the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean by this? I think it probably is true that if |
||
var reader = FileReader(); | ||
|
||
reader.onLoad.first.then((_) { | ||
var body = reader.result as Uint8List; | ||
completer.complete(StreamedResponse( | ||
ByteStream.fromBytes(body), xhr.status, | ||
ByteStream.fromBytes(body), xhr.status!, | ||
contentLength: body.length, | ||
request: request, | ||
headers: xhr.responseHeaders, | ||
|
@@ -76,6 +77,8 @@ class BrowserClient extends BaseClient { | |
reader.readAsArrayBuffer(blob); | ||
})); | ||
|
||
// TODO(kevmoo): Waiting on https://github.com/dart-lang/linter/issues/2185 | ||
// ignore: void_checks | ||
unawaited(xhr.onError.first.then((_) { | ||
// Unfortunately, the underlying XMLHttpRequest API doesn't expose any | ||
// specific information about the error itself. | ||
|
Uh oh!
There was an error while loading. Please reload this page.