Skip to content

Commit 5cb56cd

Browse files
srawlinsjcollins-gsimolus3munificentparlough
authored
Merge NNBD branch into master (#2886)
* 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 * Merge master into nnbd branch (#2747) * Switch to using CompilationUnitElement.classes (#2743) * Prepare dartdoc_options for migration (#2745) * more specific imports in options * do not allow autoinitialization * dartfmt * parameterize the valueWithContext type * Use alternative constructors instead of externalizing, didn't realize the autodetect was so widely used * more subclasses * Empty commit to straighten out GitHub Actions * Convert options/logging libraries to null safety (#2748) * Update analyzer version to 2.0.0 * grind build for analyzer 2 * First steps toward migrating * Start migrating some things around the edges and see what happens * Basic migration infrastruture for new NNBD branch * use separate workflow file for nnbd branch, for clarity * thinko * Switch to using CompilationUnitElement.classes (#2743) * Ignore null safe import warnings for presubmits * Prepare dartdoc_options for migration (#2745) * more specific imports in options * do not allow autoinitialization * dartfmt * parameterize the valueWithContext type * Use alternative constructors instead of externalizing, didn't realize the autodetect was so widely used * more subclasses * Empty commit to straighten out GitHub Actions * dartfmt * update NNBD branch from head (#2758) * Switch to using CompilationUnitElement.classes (#2743) * Prepare dartdoc_options for migration (#2745) * more specific imports in options * do not allow autoinitialization * dartfmt * parameterize the valueWithContext type * Use alternative constructors instead of externalizing, didn't realize the autodetect was so widely used * more subclasses * Disable the unstable template checks and prepare for 2.14 stable. (#2752) * Disable one of the template checks? and add beta branch for testing * beta is the new stable * empty commit - force check reset * Add a blurb to the README about requiring analysis (#2753) * Allow comment references on generic typedefs (#2756) Co-authored-by: Janice Collins <[email protected]> * Prepare for dartdoc 2.0.0 (#2754) * Prepare for dartdoc 2.0.0 * Update changelog for additional bugfix Co-authored-by: Simon Binder <[email protected]> * Migrate dartdoc_options.dart (#2749) * Switch to using CompilationUnitElement.classes (#2743) * Prepare dartdoc_options for migration (#2745) * more specific imports in options * do not allow autoinitialization * dartfmt * parameterize the valueWithContext type * Use alternative constructors instead of externalizing, didn't realize the autodetect was so widely used * more subclasses * flatten * Disable the unstable template checks and prepare for 2.14 stable. (#2752) * Disable one of the template checks? and add beta branch for testing * beta is the new stable * empty commit - force check reset * Add a blurb to the README about requiring analysis (#2753) * Allow comment references on generic typedefs (#2756) Co-authored-by: Janice Collins <[email protected]> * Prepare for dartdoc 2.0.0 (#2754) * Prepare for dartdoc 2.0.0 * Update changelog for additional bugfix * review comments Co-authored-by: Simon Binder <[email protected]> * Migrate package_meta, io_utils, and utils. (#2760) * flatten * Review comments * opt-out for inheriting container * A few more libraries migrated * Migrate warnings.dart (#2787) * Migrate mustachio to null safety (#2801) * Migrate various util and small libraries (#2805) * Migrate tool_runner to NNBD (#2804) * Migrate tool runner * dartfmt * getAs -> getValueAs * comment * Migrate the renderers to NNBD (#2816) * Migrate renderers * dartfmt * Migrate most mustachio tests to null safety (#2810) * Merge main branch to NNBD (#2826) * Refactor more documentation comment generation into DocumentationComment (#2817) * Straight move * Partial * delete experiment * rebuild * remove ??= from a cut and paste * Continuing the crushing down of documentation handling (#2818) * Straight move * Partial * delete experiment * rebuild * moved computeDocumentationComment and documentationComment * Move more documentation comment handling * remove ??= from a cut and paste * Documentation comment move for combos * better as a getter * Remove all deprecated bits in preparation for next release (#2821) * Remove all deprecated bits in preparation for next release * make some things final * documentationComment can now be non-nullable (#2819) * Straight move * Partial * delete experiment * rebuild * moved computeDocumentationComment and documentationComment * Move more documentation comment handling * remove ??= from a cut and paste * Documentation comment move for combos * better as a getter * Untangle synthetic combo documentation in preparing for non-null * rebuild * documentationComment can be made non-nullable * Update test.yaml to delete sdk check from beta branch * tab conversion error * correct name * Stop testing beta in the bots (#2824) * disable beta * try switching on stable * stable doesn't work for a lot of things now either :-( * try enabling the main bot * Change "dartfmt" -> "dart format". (#2822) Co-authored-by: Janice Collins <[email protected]> Co-authored-by: Bob Nystrom <[email protected]> * Migrate more libraries to NNBD (#2827) * migrate category * Migrate model_comment_reference and the parser * Fix test failure * Migrate comment_referable and model_object_builder (#2832) * squash * fix error in filter setup * fix test * Migrate element_type to nnbd (#2834) * Migrate markdown_processor and matching_link_result to NNBD (#2835) * Migrate element_type to nnbd * Migrate markdown_processor and matching_link_result * Migrate most of lib/src/generators to nnbd (#2837) * squash * empty commit - reset actions * Migrate most of the non-ModelElement bits of lib (#2838) * squash * rebuild * Fixup hints * Migrate most of what's left in tools/ (#2840) * squash * rebuild * migrate more things * subprocess * type adjustment in grinder * comments * Canonicalize default input dir * Revert "Canonicalize default input dir" This reverts commit 5d76a51. * Just disable the test, something odd is going on with MemoryResourceProvider. * Migrate ModelElement and subclasses to NNBD (#2843) * squash * rebuild * migrate more things * subprocess * type adjustment in grinder * partial * partial 2 * no errors, ship it * clean up a lot of warnings * All warnings done so really ship it * dartfmt * close * manual changes on renderers * comments * partial * fix some errors post-migration * holy cow it passes the tests now * make mustache happier and clean up an interface * forgot to remove a fixme * Work around strange super-not-allowed error in stable * review comments * Migrate runtime renderer to NNBD (#2849) * squash from chain merges * Things seem to work now, if not completely cleanly. * Get runtime_renderer_render_test ready for NNBD strong mode, fix a few more problems * deconfuse github * add todo * Update nnbd branch for latest changes and new resources-dir option (#2867) * Stop using JavaFile. (#2856) * Add a resources-dir option (#2857) * Skip sdk-analyzer job (#2863) * Use 'index' to access the enum value index. (#2865) Co-authored-by: Sam Rawlins <[email protected]> * Re-enable sdk-analyzer job, but make it not failing (#2864) * Update new resources-dir option for null safety * Fix html generator test merge Co-authored-by: Konstantin Scheglov <[email protected]> Co-authored-by: Sam Rawlins <[email protected]> * Utilize new Object.hash function instead of quiver code (#2868) * Minor cleanup to lints and some top level files (#2872) * Cleanup categorization to simplify template generation migration (#2875) * Cleanup model_element migration and surrounding accesses (#2876) * Migrate the generated AOT renderers to null safety (#2874) * Cleanup package_graph migration (#2869) * Migrate several test files to null safety (#2871) * Migrate comment_referable tests (#2877) * Migrate tool/grind.dart to null safety (#2870) * Migrate more tests; correct other migration bits (#2880) * Correct some bad mustachio migration; migrate mustachio tests (#2879) * Migrate the testing/ packages (#2881) * Migrate most end2end tests; null safety tweaks (#2882) * Make a few more nullable fields late final (#2883) * Migrate model_test, the last file, to null safety (#2884) * Merge master branch into nnbd branch (#2885) * Stop using JavaFile. (#2856) * Add a resources-dir option (#2857) * Skip sdk-analyzer job (#2863) * Use 'index' to access the enum value index. (#2865) Co-authored-by: Sam Rawlins <[email protected]> * Re-enable sdk-analyzer job, but make it not failing (#2864) Co-authored-by: Konstantin Scheglov <[email protected]> Co-authored-by: Janice Collins <[email protected]> Co-authored-by: Simon Binder <[email protected]> Co-authored-by: Bob Nystrom <[email protected]> Co-authored-by: Parker Lougheed <[email protected]> Co-authored-by: Konstantin Scheglov <[email protected]>
1 parent 99658ba commit 5cb56cd

File tree

177 files changed

+11342
-11545
lines changed

Some content is hidden

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

177 files changed

+11342
-11545
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: 8 additions & 8 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

@@ -20,14 +20,14 @@ jobs:
2020
matrix:
2121
os: [ubuntu-latest]
2222
sdk: [dev, stable]
23-
job: [main, flutter, sdk-analyzer, packages, sdk-docs]
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
30+
job: nnbd
3131
exclude:
3232
# Do not try to run flutter against the "stable" sdk,
3333
# it is unlikely to work and produces uninteresting
@@ -76,8 +76,8 @@ jobs:
7676
DARTDOC_BOT: ${{ matrix.job }}
7777
#COVERAGE_TOKEN: true # this needs to be set to enable coverage
7878
- name: ${{ matrix.job }}
79-
if: runner.os == 'Windows' && matrix.job == 'main'
80-
run: dart run grinder buildbot
79+
if: runner.os == 'Windows' && matrix.job == 'nnbd'
80+
run: dart run grinder buildbot-no-publish
8181
env:
8282
DARTDOC_BOT: ${{ matrix.job }}
8383
# - id: coverage

analysis_options.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,27 @@ analyzer:
1414
- 'lib/src/third_party/pkg/**'
1515
- 'lib/templates/*.html'
1616
- 'pub.dartlang.org/**'
17-
- 'testing/**'
17+
# These have a lot of lint.
18+
- 'testing/test_package/**'
19+
- 'testing/test_package_custom_templates/**'
20+
- 'testing/test_package_experiments/**'
21+
- 'testing/test_package_export_error/**'
22+
- 'testing/test_package_extensions/**'
23+
- 'testing/test_package_import_export_error/**'
24+
- 'testing/test_package_imported/**'
25+
- 'testing/test_package_options/**'
26+
# This package imports flutter, which is perhaps not found by the base `dart analyze` tool.
1827
- 'testing/flutter_packages/test_package_flutter_plugin/**'
28+
# This package is meant to mock the sky_engine package.
29+
- 'testing/sky_engine/**'
30+
# These packages have compile-time errors.
31+
- 'testing/test_package_bad/**'
1932
- 'testing/test_package_export_error/**'
2033
linter:
2134
rules:
2235
always_declare_return_types: true
36+
always_put_required_named_parameters_first: true
37+
avoid_bool_literals_in_conditional_expressions: true
2338
avoid_dynamic_calls: true
2439
avoid_single_cascade_in_expression_statements: true
2540
avoid_unused_constructor_parameters: true
@@ -29,8 +44,10 @@ linter:
2944
package_api_docs: true
3045
prefer_final_fields: true
3146
prefer_initializing_formals: true
47+
prefer_single_quotes: true
3248
prefer_void_to_null: true
3349
slash_for_doc_comments: true
3450
type_annotate_public_apis: true
3551
# Work in progress canonical score lints
3652
unawaited_futures: true
53+
unnecessary_null_aware_assignments: true

analysis_options_presubmit.yaml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,35 @@ analyzer:
1010
### Extra ignores for presubmit
1111
deprecated_member_use: ignore
1212
deprecated_member_use_from_same_package: ignore
13+
### Temporary presubmit ignore for NNBD migration
14+
import_of_legacy_library_into_null_safe: ignore
1315
language:
1416
strict-raw-types: true
1517
exclude:
1618
- 'doc/**'
1719
- 'lib/src/third_party/pkg/**'
1820
- 'lib/templates/*.html'
1921
- 'pub.dartlang.org/**'
20-
- 'testing/**'
21-
- 'testing/flutter_packages/test_package_flutter_plugin/**'
22+
# These have a lot of lint.
23+
- 'testing/test_package/**'
24+
- 'testing/test_package_custom_templates/**'
25+
- 'testing/test_package_experiments/**'
2226
- 'testing/test_package_export_error/**'
27+
- 'testing/test_package_extensions/**'
28+
- 'testing/test_package_import_export_error/**'
29+
- 'testing/test_package_imported/**'
30+
- 'testing/test_package_options/**'
31+
# This package imports flutter, which is perhaps not found by the base `dart analyze` tool.
32+
- 'testing/flutter_packages/test_package_flutter_plugin/**'
33+
# This package is meant to mock the sky_engine package.
34+
- 'testing/sky_engine/**'
35+
# These packages have compile-time errors.
36+
- 'testing/test_package_bad/**'
2337
linter:
2438
rules:
2539
always_declare_return_types: true
40+
always_put_required_named_parameters_first: true
41+
avoid_bool_literals_in_conditional_expressions: true
2642
avoid_dynamic_calls: true
2743
avoid_single_cascade_in_expression_statements: true
2844
avoid_unused_constructor_parameters: true
@@ -32,8 +48,10 @@ linter:
3248
package_api_docs: true
3349
prefer_final_fields: true
3450
prefer_initializing_formals: true
51+
prefer_single_quotes: true
3552
prefer_void_to_null: true
3653
slash_for_doc_comments: true
3754
type_annotate_public_apis: true
3855
# Work in progress canonical score lints
3956
unawaited_futures: true
57+
unnecessary_null_aware_assignments: true

0 commit comments

Comments
 (0)