Skip to content

Commit 673950e

Browse files
authored
Prepare for 0.20.2 and fix void problems (#1727)
* 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
1 parent 30183b4 commit 673950e

File tree

115 files changed

+444
-82
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+444
-82
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: dart
22
sudo: false
33
dart:
4-
- "dev/raw/2.0.0-dev.69.0"
4+
- "dev/raw/latest"
55
env:
66
- DARTDOC_BOT=main
77
- DARTDOC_BOT=packages

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.20.2
2+
* Fix void problems (#1724)
3+
* Fix crash building Angular docs and problems involving special objects (#1728,
4+
#1554)
5+
* Run pub upgrade to get packages ready for 69.2.
6+
17
## 0.20.1
28
* Remove name parameter from `@animation` parameter handling, with backwards compatibility
39
(#1715)

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# BSD-style license that can be found in the LICENSE file.
44

55
install:
6-
- 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
6+
- ps: wget https://storage.googleapis.com/dart-archive/channels/dev/raw/latest/sdk/dartsdk-windows-x64-release.zip -OutFile dart-sdk.zip
77
- cmd: echo "Unzipping dart-sdk..."
88
- cmd: 7z x dart-sdk.zip -o"C:\tools" -y > nul
99
- set PATH=%PATH%;C:\tools\dart-sdk\bin

lib/dartdoc.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export 'package:dartdoc/src/package_meta.dart';
3737

3838
const String name = 'dartdoc';
3939
// Update when pubspec version changes.
40-
const String dartdocVersion = '0.20.1';
40+
const String dartdocVersion = '0.20.2';
4141

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

8181
@override
82-
void logAnalysisErrors(Set<Source> sources) async {
82+
Future<void> logAnalysisErrors(Set<Source> sources) async {
8383
List<AnalysisErrorInfo> errorInfos = [];
8484
// TODO(jcollins-g): figure out why sources can't contain includeExternals
8585
// or embedded SDK components without having spurious(?) analysis errors.

lib/src/io_utils.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,21 @@ class MultiFutureTracker<T> {
8181
///
8282
/// That can be extremely brief and there's no longer a guarantee after that
8383
/// point that another async task has not added a Future to the list.
84-
void addFuture(Future<T> future) async {
84+
Future<void> addFuture(Future<T> future) async {
8585
_queue.add(future);
8686
future.then((f) => _queue.remove(future));
8787
await _waitUntil(parallel - 1);
8888
}
8989

9090
/// Wait until fewer or equal to this many Futures are outstanding.
91-
void _waitUntil(int max) async {
91+
Future<void> _waitUntil(int max) async {
9292
while (_queue.length > max) {
9393
await Future.any(_queue);
9494
}
9595
}
9696

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

101101
class SubprocessLauncher {

lib/src/model.dart

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,11 +1257,18 @@ class Dynamic extends ModelElement {
12571257
Dynamic(Element element, PackageGraph packageGraph)
12581258
: super(element, null, packageGraph, null);
12591259

1260+
/// [dynamic] is not a real object, and so we can't document it, so there
1261+
/// can be nothing canonical for it.
1262+
@override
1263+
ModelElement get canonicalModelElement => null;
1264+
12601265
@override
12611266
ModelElement get enclosingElement => throw new UnsupportedError('');
12621267

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

12661273
@override
12671274
String get kind => 'dynamic';
@@ -5486,7 +5493,7 @@ class PackageBuilder {
54865493

54875494
PackageBuilder(this.config);
54885495

5489-
void logAnalysisErrors(Set<Source> sources) {}
5496+
Future<void> logAnalysisErrors(Set<Source> sources) async {}
54905497

54915498
Future<PackageGraph> buildPackageGraph() async {
54925499
PackageMeta packageMeta = config.topLevelPackageMeta;
@@ -5596,7 +5603,6 @@ class PackageBuilder {
55965603
PerformanceLog log = new PerformanceLog(null);
55975604
AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log);
55985605
AnalysisOptionsImpl options = new AnalysisOptionsImpl();
5599-
options.strongMode = true;
56005606
options.enableSuperMixins = true;
56015607
options.previewDart2 = true;
56025608

0 commit comments

Comments
 (0)