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.

0 commit comments

Comments
 (0)