Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dartdoc_options.yaml
Original file line number Diff line number Diff line change
@@ -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%'
8 changes: 6 additions & 2 deletions lib/src/model/typedef.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@ class Typedef extends ModelElement
Map<String, CommentReferable> 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));
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/version.dart
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Generated code. Do not modify.
const packageVersion = '1.0.2';
const packageVersion = '2.0.0';
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 2 additions & 0 deletions testing/test_package/lib/features/generalized_typedefs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ library generalized_typedefs;

typedef T0 = void;
typedef T1 = Function;

/// [List], [String]
typedef T2<X> = List<X>;
typedef T3<X, Y> = Map<X, Y>;
typedef T4 = void Function();
Expand Down
3 changes: 2 additions & 1 deletion tool/grind.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,8 @@ final _generatedFilesList = <String>[
'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)));
Expand Down