diff --git a/.github/workflows/dart_ci.yml b/.github/workflows/dart_ci.yml index 877a68f1..c3a56b1c 100644 --- a/.github/workflows/dart_ci.yml +++ b/.github/workflows/dart_ci.yml @@ -30,11 +30,9 @@ jobs: run: dart pub run dependency_validator -i build_runner,build_test,build_web_compilers,meta if: always() && steps.install.outcome == 'success' - # TODO: Uncomment this, and remove the Dart 2.7.2 format step in the Workiva Build Dockerfile - # once we are able to bump the lower bound of SDK. -# - name: Verify formatting -# run: dart format --output=none --line-length=120 --set-exit-if-changed . -# if: always() && ${{ matrix.sdk }} == 'stable' && steps.install.outcome == 'success' + - name: Verify formatting + run: dart format --output=none --line-length=120 --set-exit-if-changed . + if: always() && ${{ matrix.sdk }} == 'stable' && steps.install.outcome == 'success' - name: Analyze project source run: dart analyze diff --git a/Dockerfile b/Dockerfile index d96a2bcb..6465a503 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,56 +1,4 @@ -FROM drydock-prod.workiva.net/workiva/dart_build_image:1 - -# Chrome install adapted from https://github.com/Workiva/dart_unit_test_image/blob/master@%7B13-01-2021%7D/Dockerfile -RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ - echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | tee /etc/apt/sources.list.d/google-chrome.list && \ - apt-get -qq update && apt-get install -y google-chrome-stable && \ - mv /usr/bin/google-chrome-stable /usr/bin/google-chrome && \ - sed -i --follow-symlinks -e 's/\"\$HERE\/chrome\"/\"\$HERE\/chrome\" --no-sandbox/g' /usr/bin/google-chrome - -# TODO: Remove this and instead run it within the github actions CI on the stable channel once SDK lower bound is >=2.9.3 -RUN dartfmt --line-length=120 --dry-run --set-exit-if-changed . - -# TODO: Remove these test runs once SDK lower bound is >=2.9.3 -RUN pub run build_runner test --release -- --preset dart2js --exclude-tags=dart-2-7-dart2js-variadic-issues -RUN pub run build_runner test -- --preset dartdevc - -# We need 2.9.2 to verify the Chrome MemoryInfo workaround: https://github.com/cleandart/react-dart/pull/280 -# TODO remove the workaround as well as this config once SDK lower bound is >=2.9.3 -FROM google/dart:2.9.2 -RUN dart --version - -# Don't allow the dart package to be updated via apt -RUN apt-mark hold dart - -# Update image - required by aviary -RUN apt-get update -qq && \ - apt-get dist-upgrade -y && \ - apt-get autoremove -y && \ - apt-get clean all -# Install deps for Chrome install -RUN apt-get install -y \ - build-essential \ - curl \ - git \ - make \ - parallel \ - wget \ - && rm -rf /var/lib/apt/lists/* - -# Chrome install adapted from https://github.com/Workiva/dart_unit_test_image/blob/master@%7B13-01-2021%7D/Dockerfile -RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ - echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | tee /etc/apt/sources.list.d/google-chrome.list && \ - apt-get -qq update && apt-get install -y google-chrome-stable && \ - mv /usr/bin/google-chrome-stable /usr/bin/google-chrome && \ - sed -i --follow-symlinks -e 's/\"\$HERE\/chrome\"/\"\$HERE\/chrome\" --no-sandbox/g' /usr/bin/google-chrome - -WORKDIR /build/ -ADD . /build/ - -RUN pub get -# Run DDC tests to verify Chrome workaround -RUN pub run build_runner test -- --preset dartdevc -# Run dart2js tests that fail in 2.7 -RUN pub run build_runner test --release -- --preset dart2js --tags=dart-2-7-dart2js-variadic-issues - +FROM google/dart:2.13 +COPY pubspec.yaml . +RUN dart pub get FROM scratch diff --git a/pubspec.yaml b/pubspec.yaml index 917656f5..7c5e4b6e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ dev_dependencies: args: ^1.5.1 build_runner: ^1.6.5 build_test: ^0.10.8 - build_web_compilers: ^2.1.4 + build_web_compilers: ^2.12.0 dependency_validator: ^1.2.0 matcher: ^0.12.5 mockito: ">=4.1.1 <6.0.0" diff --git a/test/lifecycle_test/util.dart b/test/lifecycle_test/util.dart index 068f67b9..d6d3d47d 100644 --- a/test/lifecycle_test/util.dart +++ b/test/lifecycle_test/util.dart @@ -40,7 +40,11 @@ mixin LifecycleTestHelper on Component { 'context': context, }); - var lifecycleCallback = props == null ? staticProps == null ? null : staticProps[memberName] : props[memberName]; + var lifecycleCallback = props == null + ? staticProps == null + ? null + : staticProps[memberName] + : props[memberName]; if (lifecycleCallback != null) { return Function.apply( lifecycleCallback,