diff --git a/.github/workflows/dcm.yml b/.github/workflows/dcm.yml index ab95dc293..3f837de14 100644 --- a/.github/workflows/dcm.yml +++ b/.github/workflows/dcm.yml @@ -3,16 +3,13 @@ name: Dart Code Metrics on: - pull_request_target: - # labeled and unlabeled are required along with open to re-run - # workflow when the run-dcm-workflow label is added or removed. - types: [opened, labeled, unlabeled] + pull_request: + types: [synchronize, opened, reopened] branches: - master jobs: dcm: - if: contains(github.event.pull_request.labels.*.name, 'run-dcm-workflow') name: Dart Code Metrics runs-on: ubuntu-latest steps: @@ -39,5 +36,5 @@ jobs: if: "always() && steps.checkout.conclusion == 'success'" working-directory: dwds - name: Run DCM on DWDS - run: dcm analyze --ci-key="${{ secrets.DCM_CI_KEY }}" --email="${{ secrets.DCM_EMAIL }}" lib + run: dcm analyze lib working-directory: dwds diff --git a/.github/workflows/dcm_label.yml b/.github/workflows/dcm_label.yml deleted file mode 100644 index 8679c0d43..000000000 --- a/.github/workflows/dcm_label.yml +++ /dev/null @@ -1,20 +0,0 @@ -# A CI workflow to remind the contributor to add the run-dcm-workflow label. - -name: DCM Label Reminder - -on: - pull_request: - types: [synchronize, opened, reopened, labeled, unlabeled] - paths: - - '**/*.dart' - -jobs: - changelog-reminder: - if: ${{ !contains(github.event.*.labels.*.name, 'run-dcm-workflow') }} - name: Prevent submission - runs-on: ubuntu-latest - steps: - - name: Label reminder - run: | - echo "Please add the 'run-dcm-workflow' label to run DCM checks." - exit 1 diff --git a/dwds/lib/src/debugging/inspector.dart b/dwds/lib/src/debugging/inspector.dart index 744435de7..660ee0dac 100644 --- a/dwds/lib/src/debugging/inspector.dart +++ b/dwds/lib/src/debugging/inspector.dart @@ -366,7 +366,7 @@ class AppInspector implements AppInspectorInterface { Future callFunction( String function, Iterable argumentIds, - ) async { + ) { final arguments = argumentIds.map(remoteObjectFor).toList(); return _jsCallFunction(function, arguments); } diff --git a/dwds/lib/src/loaders/strategy.dart b/dwds/lib/src/loaders/strategy.dart index d12f8e9df..77f43acd8 100644 --- a/dwds/lib/src/loaders/strategy.dart +++ b/dwds/lib/src/loaders/strategy.dart @@ -131,9 +131,12 @@ abstract class LoadStrategy { /// Initializes a [MetadataProvider] for the application located at the /// provided [entrypoint]. - Future trackEntrypoint(String entrypoint) async { + Future trackEntrypoint(String entrypoint) { final metadataProvider = MetadataProvider(entrypoint, _assetReader); _providers[metadataProvider.entrypoint] = metadataProvider; + // Returns a Future so that the asynchronous g3-implementation can override + // this method: + return Future.value(); } } diff --git a/dwds/lib/src/services/chrome_proxy_service.dart b/dwds/lib/src/services/chrome_proxy_service.dart index 659232138..913db0f5b 100644 --- a/dwds/lib/src/services/chrome_proxy_service.dart +++ b/dwds/lib/src/services/chrome_proxy_service.dart @@ -392,7 +392,7 @@ class ChromeProxyService implements VmServiceInterface { String scriptId, int line, { int? column, - }) async { + }) { return wrapInErrorHandlerAsync( 'addBreakpoint', () => _addBreakpoint(isolateId, scriptId, line),