Skip to content

Start the NNBD migration branch with additional github configuration and a basic "non-migration" of all libraries #2739

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

Merged
merged 11 commits into from
Aug 17, 2021
70 changes: 70 additions & 0 deletions .github/workflows/nnbd-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Test

on:
# Run CI on pushes to the main branch, and on PRs against main.
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: 0 15 * * *

env:
PUB_ENVIRONMENT: bot.github

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
sdk: [dev, stable]
job: [main, flutter, sdk-analyzer, packages, sdk-docs]
include:
- os: macos-latest
sdk: dev
job: main
- os: windows-latest
sdk: dev
job: main
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
if: runner.os == 'Windows'
run: git config --global core.autocrlf input
- uses: actions/checkout@v2
- uses: dart-lang/[email protected]
with:
sdk: ${{ matrix.sdk }}
- name: Install dependencies
run: dart pub get
- name: ${{ matrix.job }}
if: runner.os != 'Windows'
run: ./tool/travis.sh
env:
DARTDOC_BOT: ${{ matrix.job }}
#COVERAGE_TOKEN: true # this needs to be set to enable coverage
- name: ${{ matrix.job }}
if: runner.os == 'Windows' && matrix.job == 'main'
run: dart run grinder buildbot
env:
DARTDOC_BOT: ${{ matrix.job }}
# - id: coverage
# name: Upload coverage
# if: runner.os == 'Linux' && matrix.job == 'main' && matrix.sdk == 'dev'
# uses: coverallsapp/[email protected]
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# path-to-lcov: lcov.info
# - name: Echo coveralls api result
# if: runner.os == 'Linux' && matrix.job == 'main' && matrix.sdk == 'dev'
# run: echo ${{ steps.coverage.outputs['coveralls-api-result'] }}
26 changes: 9 additions & 17 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Test
name: Test - NNBD branch

on:
# Run CI on pushes to the main branch, and on PRs against main.
push:
branches: [ master ]
branches: [ nnbd ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 - I like the re-configuration to retain testing on the branch

pull_request:
branches: [ master ]
branches: [ nnbd ]
schedule:
- cron: 0 15 * * *

Expand All @@ -19,23 +19,15 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
sdk: [dev, stable]
job: [main, flutter, sdk-analyzer, packages, sdk-docs]
sdk: [dev]
job: [nnbd, flutter, sdk-analyzer, packages, sdk-docs]
include:
- os: macos-latest
sdk: dev
job: main
job: nnbd
- os: windows-latest
sdk: dev
job: main
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
job: nnbd

steps:
- name: Configure git
Expand All @@ -54,8 +46,8 @@ jobs:
DARTDOC_BOT: ${{ matrix.job }}
#COVERAGE_TOKEN: true # this needs to be set to enable coverage
- name: ${{ matrix.job }}
if: runner.os == 'Windows' && matrix.job == 'main'
run: dart run grinder buildbot
if: runner.os == 'Windows' && matrix.job == 'nnbd'
run: dart run grinder buildbot-no-publish
env:
DARTDOC_BOT: ${{ matrix.job }}
# - id: coverage
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
3 changes: 3 additions & 0 deletions lib/src/comment_references/model_comment_reference.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// 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/ast/ast.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/file_system/file_system.dart';
Expand Down
3 changes: 3 additions & 0 deletions lib/src/comment_references/parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// 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:charcode/charcode.dart';
import 'package:meta/meta.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:analyzer/file_system/file_system.dart';
import 'package:dartdoc/dartdoc.dart';
import 'package:dartdoc/options.dart';
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:analyzer/file_system/file_system.dart';
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:analyzer/file_system/file_system.dart';
import 'package:dartdoc/options.dart';
import 'package:dartdoc/src/generator/dartdoc_generator_backend.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(
Expand Down
1 change: 1 addition & 0 deletions lib/src/generator/templates.aot_renderers_for_html.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// the variable is not used; generally when the section is checking if a
// non-bool, non-Iterable field is non-null.
// ignore_for_file: unused_local_variable
// @dart=2.9

import 'dart:convert' as _i18;

Expand Down
1 change: 1 addition & 0 deletions lib/src/generator/templates.aot_renderers_for_md.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// the variable is not used; generally when the section is checking if a
// non-bool, non-Iterable field is non-null.
// ignore_for_file: unused_local_variable
// @dart=2.9

import 'dart:convert' as _i18;

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

@Renderer(#renderCategory, Context<CategoryTemplateData>(), 'category',
visibleTypes: _visibleTypes)
@Renderer(#renderClass, Context<ClassTemplateData>(), 'class')
Expand Down
1 change: 1 addition & 0 deletions lib/src/generator/templates.runtime_renderers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

// ignore_for_file: camel_case_types, deprecated_member_use_from_same_package
// ignore_for_file: unused_import
// @dart=2.9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this language comment is ok here (after the ignore comments).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be! If it wasn't, it would definitely fail tests at this point.

import 'package:dartdoc/dartdoc.dart';
import 'package:dartdoc/src/generator/template_data.dart';
import 'package:dartdoc/src/model/annotation.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/matching_link_result.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/element_type.dart';
import 'package:dartdoc/src/model/comment_referable.dart';
import 'package:dartdoc/src/model/model.dart';
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/source/line_info.dart';
import 'package:analyzer/src/dart/element/member.dart' show ExecutableMember;
Expand Down
2 changes: 2 additions & 0 deletions lib/src/model/annotation.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/feature.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/comment_references/model_comment_reference.dart';
import 'package:dartdoc/src/model/model.dart';

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/comment_references/model_comment_reference.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
Loading