diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4f3f3c50c9..a53d16c2f3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -28,6 +28,14 @@ jobs: - os: windows-latest sdk: dev job: nnbd + exclude: + # Do not try to run flutter against the "stable" sdk, + # it is unlikely to work and produces uninteresting + # results. + - sdk: stable + job: flutter + - sdk: stable + job: sdk-analyzer steps: - name: Configure git diff --git a/CHANGELOG.md b/CHANGELOG.md index a9a32e1a3c..e47033a8da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## 2.0.0 +* BREAKING CHANGE: changes to dartdoc options API + to prepare for NNBD migration (#2745, #2744). +* Fix unbound type reference in extension method comment + reference creating a null dereference (#2741, #2740) +* Update to analyzer 2.0. (#2734) +* Fix comment references on generic typedefs in new + lookup code. (#2755, #2756) + ## 1.0.2 * Fix where extensions header in library sidebar linked to the diff --git a/README.md b/README.md index 01fb7d69d5..6c41da2dd2 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,9 @@ Run `pub global activate dartdoc` to install the latest version of dartdoc compa ## Generating docs -Run `dartdoc` from the root directory of a package. Here is an example of dartdoc documenting itself: +Run `dartdoc` from the root directory of a package. Your package must analyze without errors +with `dart analyze` or `flutter analyze` as appropriate. Here is an example of dartdoc documenting +itself: ``` $ dartdoc diff --git a/dartdoc_options.yaml b/dartdoc_options.yaml index 1f6e65ac2c..242689dbfc 100644 --- a/dartdoc_options.yaml +++ b/dartdoc_options.yaml @@ -1,4 +1,4 @@ dartdoc: linkToSource: root: '.' - uriTemplate: 'https://github.com/dart-lang/dartdoc/blob/v1.0.2/%f%#L%l%' + uriTemplate: 'https://github.com/dart-lang/dartdoc/blob/v2.0.0/%f%#L%l%' diff --git a/lib/src/model/typedef.dart b/lib/src/model/typedef.dart index 3398db83e4..75bc26c921 100644 --- a/lib/src/model/typedef.dart +++ b/lib/src/model/typedef.dart @@ -73,8 +73,12 @@ class Typedef extends ModelElement Map get referenceChildren { if (_referenceChildren == null) { _referenceChildren = {}; - _referenceChildren - .addEntriesIfAbsent(parameters.explicitOnCollisionWith(this)); + + // Only consider parameters if this is a function typedef. + if (isCallable) { + _referenceChildren + .addEntriesIfAbsent(parameters.explicitOnCollisionWith(this)); + } _referenceChildren .addEntriesIfAbsent(typeParameters.explicitOnCollisionWith(this)); } diff --git a/lib/src/version.dart b/lib/src/version.dart index b0e99a53ed..0e58df3934 100644 --- a/lib/src/version.dart +++ b/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '1.0.2'; +const packageVersion = '2.0.0'; diff --git a/pubspec.yaml b/pubspec.yaml index fd5b5e365a..62c0cc8331 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: dartdoc # Run `grind build` after updating. -version: 1.0.2 +version: 2.0.0 description: A non-interactive HTML documentation generator for Dart source code. homepage: https://github.com/dart-lang/dartdoc environment: diff --git a/testing/test_package/lib/features/generalized_typedefs.dart b/testing/test_package/lib/features/generalized_typedefs.dart index e43a9d721b..220be96e82 100644 --- a/testing/test_package/lib/features/generalized_typedefs.dart +++ b/testing/test_package/lib/features/generalized_typedefs.dart @@ -10,6 +10,8 @@ library generalized_typedefs; typedef T0 = void; typedef T1 = Function; + +/// [List], [String] typedef T2 = List; typedef T3 = Map; typedef T4 = void Function(); diff --git a/tool/grind.dart b/tool/grind.dart index 5485e95383..d9723f8d91 100644 --- a/tool/grind.dart +++ b/tool/grind.dart @@ -1062,7 +1062,8 @@ final _generatedFilesList = [ 'src/generator/html_resources.g.dart', 'src/generator/templates.aot_renderers_for_html.dart', 'src/generator/templates.aot_renderers_for_md.dart', - 'src/generator/templates.runtime_renderers.dart', + // TODO(jcollins-g): https://github.com/dart-lang/dartdoc/issues/2751 + //'src/generator/templates.runtime_renderers.dart', 'src/version.dart', '../test/mustachio/foo.dart', ].map((s) => path.joinAll(path.posix.split(s)));