Skip to content

Commit

Permalink
Prepare for 0.20.2 and fix void problems (#1727)
Browse files Browse the repository at this point in the history
* Prepare for 0.20.2 and fix void problems

* dartfmt

* Fix travis problems and expand sdk deps to let Flutter's SDK back in

* Type change

* Update changelog and pubspec.lock for 69.2

* Update packages to latest versions where possible

* Refix #1728 after updating packages

* review comment
  • Loading branch information
jcollins-g authored Jul 25, 2018
1 parent 30183b4 commit 673950e
Show file tree
Hide file tree
Showing 115 changed files with 444 additions and 82 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: dart
sudo: false
dart:
- "dev/raw/2.0.0-dev.69.0"
- "dev/raw/latest"
env:
- DARTDOC_BOT=main
- DARTDOC_BOT=packages
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.20.2
* Fix void problems (#1724)
* Fix crash building Angular docs and problems involving special objects (#1728,
#1554)
* Run pub upgrade to get packages ready for 69.2.

## 0.20.1
* Remove name parameter from `@animation` parameter handling, with backwards compatibility
(#1715)
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# BSD-style license that can be found in the LICENSE file.

install:
- ps: wget https://storage.googleapis.com/dart-archive/channels/dev/raw/2.0.0-dev.69.0/sdk/dartsdk-windows-x64-release.zip -OutFile dart-sdk.zip
- ps: wget https://storage.googleapis.com/dart-archive/channels/dev/raw/latest/sdk/dartsdk-windows-x64-release.zip -OutFile dart-sdk.zip
- cmd: echo "Unzipping dart-sdk..."
- cmd: 7z x dart-sdk.zip -o"C:\tools" -y > nul
- set PATH=%PATH%;C:\tools\dart-sdk\bin
Expand Down
4 changes: 2 additions & 2 deletions lib/dartdoc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export 'package:dartdoc/src/package_meta.dart';

const String name = 'dartdoc';
// Update when pubspec version changes.
const String dartdocVersion = '0.20.1';
const String dartdocVersion = '0.20.2';

/// Helper class to initialize the default generators since they require
/// GeneratorContext.
Expand Down Expand Up @@ -79,7 +79,7 @@ class Dartdoc extends PackageBuilder {
Stream<String> get onCheckProgress => _onCheckProgress.stream;

@override
void logAnalysisErrors(Set<Source> sources) async {
Future<void> logAnalysisErrors(Set<Source> sources) async {
List<AnalysisErrorInfo> errorInfos = [];
// TODO(jcollins-g): figure out why sources can't contain includeExternals
// or embedded SDK components without having spurious(?) analysis errors.
Expand Down
6 changes: 3 additions & 3 deletions lib/src/io_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,21 @@ class MultiFutureTracker<T> {
///
/// That can be extremely brief and there's no longer a guarantee after that
/// point that another async task has not added a Future to the list.
void addFuture(Future<T> future) async {
Future<void> addFuture(Future<T> future) async {
_queue.add(future);
future.then((f) => _queue.remove(future));
await _waitUntil(parallel - 1);
}

/// Wait until fewer or equal to this many Futures are outstanding.
void _waitUntil(int max) async {
Future<void> _waitUntil(int max) async {
while (_queue.length > max) {
await Future.any(_queue);
}
}

/// Wait until all futures added so far have completed.
void wait() async => await _waitUntil(0);
Future<void> wait() async => await _waitUntil(0);
}

class SubprocessLauncher {
Expand Down
12 changes: 9 additions & 3 deletions lib/src/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1257,11 +1257,18 @@ class Dynamic extends ModelElement {
Dynamic(Element element, PackageGraph packageGraph)
: super(element, null, packageGraph, null);

/// [dynamic] is not a real object, and so we can't document it, so there
/// can be nothing canonical for it.
@override
ModelElement get canonicalModelElement => null;

@override
ModelElement get enclosingElement => throw new UnsupportedError('');

/// And similiarly, even if someone references it directly it can have
/// no hyperlink.
@override
String get href => throw new StateError('dynamic should not have an href');
String get href => null;

@override
String get kind => 'dynamic';
Expand Down Expand Up @@ -5486,7 +5493,7 @@ class PackageBuilder {

PackageBuilder(this.config);

void logAnalysisErrors(Set<Source> sources) {}
Future<void> logAnalysisErrors(Set<Source> sources) async {}

Future<PackageGraph> buildPackageGraph() async {
PackageMeta packageMeta = config.topLevelPackageMeta;
Expand Down Expand Up @@ -5596,7 +5603,6 @@ class PackageBuilder {
PerformanceLog log = new PerformanceLog(null);
AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log);
AnalysisOptionsImpl options = new AnalysisOptionsImpl();
options.strongMode = true;
options.enableSuperMixins = true;
options.previewDart2 = true;

Expand Down
Loading

0 comments on commit 673950e

Please sign in to comment.