Skip to content

Use dependency overrides to make dartdoc work with sdk head analyzer #2502

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

Closed
wants to merge 7 commits into from
Closed
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
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
sdk: [dev, stable]
# Add sdk-analyzer once #2500 is addressed
job: [main, flutter, packages, sdk-docs]
# Add stable back in after 2.12 is published.
sdk: [dev]
job: [main, flutter, sdk-analyzer, packages, sdk-docs]
include:
- os: macos-latest
sdk: dev
Expand Down
2 changes: 2 additions & 0 deletions bin/dartdoc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

library dartdoc.bin;

import 'dart:async';
Expand Down
2 changes: 2 additions & 0 deletions lib/dartdoc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

/// A documentation generator for Dart.
///
/// Library interface is currently under heavy construction and may change
Expand Down
2 changes: 2 additions & 0 deletions lib/options.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// @dart=2.9

import 'dart:io' show stderr, exitCode;

import 'package:analyzer/file_system/file_system.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/dartdoc_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

///
/// dartdoc's dartdoc_options.yaml configuration file follows similar loading
/// semantics to that of analysis_options.yaml,
Expand Down
2 changes: 2 additions & 0 deletions lib/src/element_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

/// The models used to represent Dart code.
library dartdoc.element_type;

Expand Down
2 changes: 2 additions & 0 deletions lib/src/experiment_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

///
/// Implementation of Dart language experiment option handling for dartdoc.
/// See https://github.com/dart-lang/sdk/blob/master/docs/process/experimental-flags.md.
Expand Down
2 changes: 2 additions & 0 deletions lib/src/generator/dartdoc_generator_backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:dartdoc/dartdoc.dart';
import 'package:dartdoc/src/generator/generator_frontend.dart';
import 'package:dartdoc/src/generator/generator_utils.dart' as generator_util;
Expand Down
2 changes: 2 additions & 0 deletions lib/src/generator/empty_generator.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// @dart=2.9

library dartdoc.empty_generator;

import 'package:dartdoc/src/dartdoc_options.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/generator/generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

/// A library containing an abstract documentation generator.
library dartdoc.generator;

Expand Down
2 changes: 2 additions & 0 deletions lib/src/generator/generator_frontend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:dartdoc/src/generator/generator.dart';
import 'package:dartdoc/src/logging.dart';
import 'package:dartdoc/src/model/model.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/generator/generator_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'dart:convert';

import 'package:collection/collection.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/generator/html_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

library dartdoc.html_generator;

import 'package:dartdoc/dartdoc.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/generator/html_resources.g.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// WARNING: This file is auto-generated. Do not taunt.

// @dart=2.9

const List<String> resource_names = [
'package:dartdoc/resources/favicon.png',
'package:dartdoc/resources/github.css',
Expand Down
2 changes: 2 additions & 0 deletions lib/src/generator/markdown_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:dartdoc/dartdoc.dart';
import 'package:dartdoc/src/generator/dartdoc_generator_backend.dart';
import 'package:dartdoc/src/generator/generator.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/generator/resource_loader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

/// Make it possible to load resources from the dartdoc code repository.
library dartdoc.resource_loader;

Expand Down
2 changes: 2 additions & 0 deletions lib/src/generator/template_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:dartdoc/src/model/model.dart';

typedef ContainerSidebar = String Function(Container, TemplateData);
Expand Down
2 changes: 2 additions & 0 deletions lib/src/generator/templates.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

// TODO(srawlins): Add Renderer annotations for more types as the mustachio
// implementation matures.
@Renderer(#renderIndex, Context<PackageTemplateData>())
Expand Down
2 changes: 2 additions & 0 deletions lib/src/generator/templates.renderers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// To change the contents of this library, make changes to the builder source
// files in the tool/mustachio/ directory.

// @dart=2.9

// ignore_for_file: camel_case_types, unnecessary_cast, unused_element, unused_import
import 'package:analyzer/file_system/file_system.dart';
import 'package:dartdoc/src/generator/template_data.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/io_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

/// This is a helper library to make working with io easier.
library dartdoc.io_utils;

Expand Down
2 changes: 2 additions & 0 deletions lib/src/logging.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'dart:convert';
import 'dart:io' show stderr, stdout;

Expand Down
2 changes: 2 additions & 0 deletions lib/src/markdown_processor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

/// Utility code to convert markdown comments to html.
library dartdoc.markdown_processor;

Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/accessor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/src/dart/element/member.dart' show Member;
import 'package:dartdoc/src/model/model.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/canonicalization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:dartdoc/src/model/model.dart';

/// Classes extending this class have canonicalization support in Dartdoc.
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/categorization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:dartdoc/src/model/model.dart';

final RegExp _categoryRegExp = RegExp(
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/category.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/file_system/file_system.dart';
import 'package:dartdoc/src/dartdoc_options.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/class.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
import 'package:dartdoc/src/element_type.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/constructor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/source/line_info.dart';
import 'package:dartdoc/src/element_type.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:analyzer/dart/element/element.dart';
import 'package:dartdoc/src/model/model.dart';
import 'package:dartdoc/src/model_utils.dart' as model_utils;
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/container_member.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:dartdoc/src/model/model.dart';

/// A [ModelElement] that is a [Container] member.
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/documentable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:analyzer/file_system/file_system.dart';
import 'package:dartdoc/src/dartdoc_options.dart';
import 'package:dartdoc/src/io_utils.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/documentation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:dartdoc/src/markdown_processor.dart';
import 'package:dartdoc/src/model/model.dart';
import 'package:dartdoc/src/render/documentation_renderer.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/documentation_comment.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// @dart=2.9

import 'package:args/args.dart';
import 'package:crypto/crypto.dart' as crypto;
import 'package:dartdoc/src/model/model.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/dynamic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:analyzer/dart/element/element.dart';
import 'package:dartdoc/src/model/model.dart';

Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/enclosed_element.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:dartdoc/src/model/model.dart';

/// An element that is enclosed by some other element.
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/enum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

// TODO(jcollins-g): Consider Enum as subclass of Container?
import 'package:analyzer/dart/element/element.dart';
import 'package:dartdoc/src/model/model.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/extendable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:dartdoc/src/model/model.dart';

/// Mixin for subclasses of [ModelElement] representing Elements that can be
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:analyzer/dart/element/element.dart';
import 'package:dartdoc/src/element_type.dart';
import 'package:dartdoc/src/model/extension_target.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/extension_target.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:dartdoc/src/model/model.dart';

// TODO(jcollins-g): Mix-in ExtensionTarget on Method, ModelFunction, Typedef,
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/feature_set.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:dartdoc/src/model/language_feature.dart';
import 'package:dartdoc/src/model/model.dart';

Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/src/dart/element/element.dart';
import 'package:dartdoc/src/element_type.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/getter_setter_combo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'dart:convert';

import 'package:analyzer/dart/ast/ast.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/indexable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:dartdoc/src/model/model.dart';

/// Something able to be indexed.
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/inheritable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:dartdoc/src/model/model.dart';
import 'package:dartdoc/src/special_elements.dart';

Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/language_feature.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart=2.9

import 'package:dartdoc/src/render/feature_renderer.dart';

const Map<String, String> _featureDescriptions = {
Expand Down
Loading