Skip to content

Commit 7e202b9

Browse files
authored
Start the NNBD migration branch with additional github configuration and a basic "non-migration" of all libraries (#2739)
* Update analyzer version to 2.0.0 * grind build for analyzer 2 * First steps toward migrating * Basic migration infrastruture for new NNBD branch * use separate workflow file for nnbd branch, for clarity * thinko
1 parent fbd49b4 commit 7e202b9

File tree

149 files changed

+377
-19
lines changed

Some content is hidden

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

149 files changed

+377
-19
lines changed

.github/workflows/nnbd-test.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Test
2+
3+
on:
4+
# Run CI on pushes to the main branch, and on PRs against main.
5+
push:
6+
branches: [ master ]
7+
pull_request:
8+
branches: [ master ]
9+
schedule:
10+
- cron: 0 15 * * *
11+
12+
env:
13+
PUB_ENVIRONMENT: bot.github
14+
15+
jobs:
16+
test:
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: [ubuntu-latest]
22+
sdk: [dev, stable]
23+
job: [main, flutter, sdk-analyzer, packages, sdk-docs]
24+
include:
25+
- os: macos-latest
26+
sdk: dev
27+
job: main
28+
- os: windows-latest
29+
sdk: dev
30+
job: main
31+
exclude:
32+
# Do not try to run flutter against the "stable" sdk,
33+
# it is unlikely to work and produces uninteresting
34+
# results.
35+
- sdk: stable
36+
job: flutter
37+
- sdk: stable
38+
job: sdk-analyzer
39+
40+
steps:
41+
- name: Configure git
42+
if: runner.os == 'Windows'
43+
run: git config --global core.autocrlf input
44+
- uses: actions/checkout@v2
45+
- uses: dart-lang/[email protected]
46+
with:
47+
sdk: ${{ matrix.sdk }}
48+
- name: Install dependencies
49+
run: dart pub get
50+
- name: ${{ matrix.job }}
51+
if: runner.os != 'Windows'
52+
run: ./tool/travis.sh
53+
env:
54+
DARTDOC_BOT: ${{ matrix.job }}
55+
#COVERAGE_TOKEN: true # this needs to be set to enable coverage
56+
- name: ${{ matrix.job }}
57+
if: runner.os == 'Windows' && matrix.job == 'main'
58+
run: dart run grinder buildbot
59+
env:
60+
DARTDOC_BOT: ${{ matrix.job }}
61+
# - id: coverage
62+
# name: Upload coverage
63+
# if: runner.os == 'Linux' && matrix.job == 'main' && matrix.sdk == 'dev'
64+
# uses: coverallsapp/[email protected]
65+
# with:
66+
# github-token: ${{ secrets.GITHUB_TOKEN }}
67+
# path-to-lcov: lcov.info
68+
# - name: Echo coveralls api result
69+
# if: runner.os == 'Linux' && matrix.job == 'main' && matrix.sdk == 'dev'
70+
# run: echo ${{ steps.coverage.outputs['coveralls-api-result'] }}

.github/workflows/test.yaml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: Test
1+
name: Test - NNBD branch
22

33
on:
44
# Run CI on pushes to the main branch, and on PRs against main.
55
push:
6-
branches: [ master ]
6+
branches: [ nnbd ]
77
pull_request:
8-
branches: [ master ]
8+
branches: [ nnbd ]
99
schedule:
1010
- cron: 0 15 * * *
1111

@@ -19,23 +19,15 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
os: [ubuntu-latest]
22-
sdk: [dev, stable]
23-
job: [main, flutter, sdk-analyzer, packages, sdk-docs]
22+
sdk: [dev]
23+
job: [nnbd, flutter, sdk-analyzer, packages, sdk-docs]
2424
include:
2525
- os: macos-latest
2626
sdk: dev
27-
job: main
27+
job: nnbd
2828
- os: windows-latest
2929
sdk: dev
30-
job: main
31-
exclude:
32-
# Do not try to run flutter against the "stable" sdk,
33-
# it is unlikely to work and produces uninteresting
34-
# results.
35-
- sdk: stable
36-
job: flutter
37-
- sdk: stable
38-
job: sdk-analyzer
30+
job: nnbd
3931

4032
steps:
4133
- name: Configure git
@@ -54,8 +46,8 @@ jobs:
5446
DARTDOC_BOT: ${{ matrix.job }}
5547
#COVERAGE_TOKEN: true # this needs to be set to enable coverage
5648
- name: ${{ matrix.job }}
57-
if: runner.os == 'Windows' && matrix.job == 'main'
58-
run: dart run grinder buildbot
49+
if: runner.os == 'Windows' && matrix.job == 'nnbd'
50+
run: dart run grinder buildbot-no-publish
5951
env:
6052
DARTDOC_BOT: ${{ matrix.job }}
6153
# - id: coverage

bin/dartdoc.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
library dartdoc.bin;
68

79
import 'dart:async';

lib/dartdoc.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
/// A documentation generator for Dart.
68
///
79
/// Library interface is currently under heavy construction and may change

lib/options.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// @dart=2.9
2+
13
import 'dart:io' show stderr, exitCode;
24

35
import 'package:analyzer/file_system/file_system.dart';

lib/src/comment_references/model_comment_reference.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44
//
5+
6+
// @dart=2.9
7+
58
import 'package:analyzer/dart/ast/ast.dart';
69
import 'package:analyzer/dart/element/element.dart';
710
import 'package:analyzer/file_system/file_system.dart';

lib/src/comment_references/parser.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44
//
5+
6+
// @dart=2.9
7+
58
import 'package:charcode/charcode.dart';
69
import 'package:meta/meta.dart';
710

lib/src/dartdoc_options.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
///
68
/// dartdoc's dartdoc_options.yaml configuration file follows similar loading
79
/// semantics to that of analysis_options.yaml,

lib/src/element_type.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
/// The models used to represent Dart code.
68
library dartdoc.element_type;
79

lib/src/experiment_options.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
///
68
/// Implementation of Dart language experiment option handling for dartdoc.
79
/// See https://github.com/dart-lang/sdk/blob/master/docs/process/experimental-flags.md.

lib/src/generator/dartdoc_generator_backend.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
import 'package:analyzer/file_system/file_system.dart';
68
import 'package:dartdoc/dartdoc.dart';
79
import 'package:dartdoc/options.dart';

lib/src/generator/empty_generator.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// @dart=2.9
2+
13
library dartdoc.empty_generator;
24

35
import 'package:dartdoc/src/dartdoc_options.dart';

lib/src/generator/generator.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
/// A library containing an abstract documentation generator.
68
library dartdoc.generator;
79

lib/src/generator/generator_frontend.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
import 'package:dartdoc/src/generator/generator.dart';
68
import 'package:dartdoc/src/logging.dart';
79
import 'package:dartdoc/src/model/model.dart';

lib/src/generator/generator_utils.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
import 'dart:convert';
68

79
import 'package:collection/collection.dart';

lib/src/generator/html_generator.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
library dartdoc.html_generator;
68

79
import 'package:analyzer/file_system/file_system.dart';

lib/src/generator/markdown_generator.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
import 'package:analyzer/file_system/file_system.dart';
68
import 'package:dartdoc/options.dart';
79
import 'package:dartdoc/src/generator/dartdoc_generator_backend.dart';

lib/src/generator/resource_loader.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
/// Make it possible to load resources from the dartdoc code repository.
68
library dartdoc.resource_loader;
79

lib/src/generator/template_data.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
import 'package:dartdoc/src/model/model.dart';
68

79
typedef ContainerSidebar = String Function(

lib/src/generator/templates.aot_renderers_for_html.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// the variable is not used; generally when the section is checking if a
88
// non-bool, non-Iterable field is non-null.
99
// ignore_for_file: unused_local_variable
10+
// @dart=2.9
1011

1112
import 'dart:convert' as _i18;
1213

lib/src/generator/templates.aot_renderers_for_md.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// the variable is not used; generally when the section is checking if a
88
// non-bool, non-Iterable field is non-null.
99
// ignore_for_file: unused_local_variable
10+
// @dart=2.9
1011

1112
import 'dart:convert' as _i18;
1213

lib/src/generator/templates.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
@Renderer(#renderCategory, Context<CategoryTemplateData>(), 'category',
68
visibleTypes: _visibleTypes)
79
@Renderer(#renderClass, Context<ClassTemplateData>(), 'class')

lib/src/generator/templates.runtime_renderers.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
// ignore_for_file: camel_case_types, deprecated_member_use_from_same_package
77
// ignore_for_file: unused_import
8+
// @dart=2.9
89
import 'package:dartdoc/dartdoc.dart';
910
import 'package:dartdoc/src/generator/template_data.dart';
1011
import 'package:dartdoc/src/model/annotation.dart';

lib/src/io_utils.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
/// This is a helper library to make working with io easier.
68
library dartdoc.io_utils;
79

lib/src/logging.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
import 'dart:convert';
68
import 'dart:io' show stderr, stdout;
79

lib/src/markdown_processor.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
/// Utility code to convert markdown comments to html.
68
library dartdoc.markdown_processor;
79

lib/src/matching_link_result.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
import 'package:dartdoc/src/element_type.dart';
68
import 'package:dartdoc/src/model/comment_referable.dart';
79
import 'package:dartdoc/src/model/model.dart';

lib/src/model/accessor.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
import 'package:analyzer/dart/element/element.dart';
68
import 'package:analyzer/source/line_info.dart';
79
import 'package:analyzer/src/dart/element/member.dart' show ExecutableMember;

lib/src/model/annotation.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
import 'package:analyzer/dart/element/element.dart';
68
import 'package:dartdoc/src/element_type.dart';
79
import 'package:dartdoc/src/model/feature.dart';

lib/src/model/canonicalization.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
import 'package:dartdoc/src/comment_references/model_comment_reference.dart';
68
import 'package:dartdoc/src/model/model.dart';
79

lib/src/model/categorization.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
import 'package:dartdoc/src/model/model.dart';
68

79
final RegExp _categoryRegExp = RegExp(

lib/src/model/category.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
import 'package:analyzer/dart/element/element.dart';
68
import 'package:analyzer/file_system/file_system.dart';
79
import 'package:dartdoc/src/comment_references/model_comment_reference.dart';

lib/src/model/class.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart=2.9
6+
57
import 'package:analyzer/dart/element/element.dart';
68
import 'package:analyzer/dart/element/type.dart';
79
import 'package:dartdoc/src/element_type.dart';

0 commit comments

Comments
 (0)