Skip to content

Fix handling of files with spaces in frontend_server_client #1382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 146 additions & 54 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Created with package:mono_repo v5.0.0
# Created with package:mono_repo v5.0.2
name: Dart CI
on:
push:
Expand Down Expand Up @@ -28,48 +28,16 @@ jobs:
restore-keys: |
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- uses: dart-lang/setup-dart@v1.0
- uses: dart-lang/setup-dart@v1.2
with:
sdk: stable
- id: checkout
uses: actions/[email protected]
- name: mono_repo self validate
run: dart pub global activate mono_repo 5.0.0
run: dart pub global activate mono_repo 5.0.2
- name: mono_repo self validate
run: dart pub global run mono_repo generate --validate
job_002:
name: "analyzer_and_format; linux; Dart 2.12.0; PKG: frontend_server_client; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/[email protected]
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;dart:2.12.0;packages:frontend_server_client;commands:format-analyze"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;dart:2.12.0;packages:frontend_server_client
os:ubuntu-latest;pub-cache-hosted;dart:2.12.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- uses: dart-lang/[email protected]
with:
sdk: "2.12.0"
- id: checkout
uses: actions/[email protected]
- id: frontend_server_client_pub_upgrade
name: frontend_server_client; dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: frontend_server_client
run: dart pub upgrade
- name: "frontend_server_client; dart format --output=none --set-exit-if-changed ."
if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'"
working-directory: frontend_server_client
run: "dart format --output=none --set-exit-if-changed ."
- name: "frontend_server_client; dart analyze --fatal-infos ."
if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'"
working-directory: frontend_server_client
run: dart analyze --fatal-infos .
job_003:
name: "analyzer_and_format; linux; Dart dev; PKG: dwds; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`, `dart test test/build/ensure_version_test.dart`"
runs-on: ubuntu-latest
steps:
Expand All @@ -83,7 +51,7 @@ jobs:
os:ubuntu-latest;pub-cache-hosted;dart:dev
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- uses: dart-lang/setup-dart@v1.0
- uses: dart-lang/setup-dart@v1.2
with:
sdk: dev
- id: checkout
Expand All @@ -105,21 +73,21 @@ jobs:
if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'"
working-directory: dwds
run: dart test test/build/ensure_version_test.dart
job_004:
name: "analyzer_and_format; linux; Dart dev; PKGS: example, fixtures/_webdevSmoke, frontend_server_common; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`"
job_003:
name: "analyzer_and_format; linux; Dart dev; PKGS: example, fixtures/_webdevSmoke, frontend_server_client, frontend_server_common; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/[email protected]
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:example-fixtures/_webdevSmoke-frontend_server_common;commands:format-analyze"
key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:example-fixtures/_webdevSmoke-frontend_server_client-frontend_server_common;commands:format-analyze"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:example-fixtures/_webdevSmoke-frontend_server_common
os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:example-fixtures/_webdevSmoke-frontend_server_client-frontend_server_common
os:ubuntu-latest;pub-cache-hosted;dart:dev
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- uses: dart-lang/setup-dart@v1.0
- uses: dart-lang/setup-dart@v1.2
with:
sdk: dev
- id: checkout
Expand Down Expand Up @@ -150,6 +118,19 @@ jobs:
if: "always() && steps.fixtures__webdevSmoke_pub_upgrade.conclusion == 'success'"
working-directory: fixtures/_webdevSmoke
run: dart analyze --fatal-infos .
- id: frontend_server_client_pub_upgrade
name: frontend_server_client; dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: frontend_server_client
run: dart pub upgrade
- name: "frontend_server_client; dart format --output=none --set-exit-if-changed ."
if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'"
working-directory: frontend_server_client
run: "dart format --output=none --set-exit-if-changed ."
- name: "frontend_server_client; dart analyze --fatal-infos ."
if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'"
working-directory: frontend_server_client
run: dart analyze --fatal-infos .
- id: frontend_server_common_pub_upgrade
name: frontend_server_common; dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
Expand All @@ -163,7 +144,7 @@ jobs:
if: "always() && steps.frontend_server_common_pub_upgrade.conclusion == 'success'"
working-directory: frontend_server_common
run: dart analyze --fatal-infos .
job_005:
job_004:
name: "analyzer_and_format; linux; Dart dev; PKG: webdev; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`, `dart test test/build/ensure_build_test.dart`"
runs-on: ubuntu-latest
steps:
Expand All @@ -177,7 +158,7 @@ jobs:
os:ubuntu-latest;pub-cache-hosted;dart:dev
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- uses: dart-lang/setup-dart@v1.0
- uses: dart-lang/setup-dart@v1.2
with:
sdk: dev
- id: checkout
Expand All @@ -199,7 +180,7 @@ jobs:
if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'"
working-directory: webdev
run: dart test test/build/ensure_build_test.dart
job_006:
job_005:
name: "unit_test; linux; Dart dev; PKG: dwds; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test`"
runs-on: ubuntu-latest
steps:
Expand All @@ -213,7 +194,7 @@ jobs:
os:ubuntu-latest;pub-cache-hosted;dart:dev
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- uses: dart-lang/setup-dart@v1.0
- uses: dart-lang/setup-dart@v1.2
with:
sdk: dev
- id: checkout
Expand All @@ -236,7 +217,39 @@ jobs:
- job_002
- job_003
- job_004
- job_005
job_006:
name: "unit_test; linux; Dart dev; PKG: frontend_server_client; `dart test`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/[email protected]
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:frontend_server_client;commands:test_1"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:frontend_server_client
os:ubuntu-latest;pub-cache-hosted;dart:dev
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- uses: dart-lang/[email protected]
with:
sdk: dev
- id: checkout
uses: actions/[email protected]
- id: frontend_server_client_pub_upgrade
name: frontend_server_client; dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: frontend_server_client
run: dart pub upgrade
- name: frontend_server_client; dart test
if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'"
working-directory: frontend_server_client
run: dart test
needs:
- job_001
- job_002
- job_003
- job_004
job_007:
name: "unit_test; linux; Dart dev; PKG: webdev; `Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &`, `dart test -j 1`"
runs-on: ubuntu-latest
Expand All @@ -251,7 +264,7 @@ jobs:
os:ubuntu-latest;pub-cache-hosted;dart:dev
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- uses: dart-lang/setup-dart@v1.0
- uses: dart-lang/setup-dart@v1.2
with:
sdk: dev
- id: checkout
Expand All @@ -274,12 +287,44 @@ jobs:
- job_002
- job_003
- job_004
- job_005
job_008:
name: "unit_test; linux; Dart stable; PKG: frontend_server_client; `dart test`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/[email protected]
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;dart:stable;packages:frontend_server_client;commands:test_1"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;dart:stable;packages:frontend_server_client
os:ubuntu-latest;pub-cache-hosted;dart:stable
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- uses: dart-lang/[email protected]
with:
sdk: stable
- id: checkout
uses: actions/[email protected]
- id: frontend_server_client_pub_upgrade
name: frontend_server_client; dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: frontend_server_client
run: dart pub upgrade
- name: frontend_server_client; dart test
if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'"
working-directory: frontend_server_client
run: dart test
needs:
- job_001
- job_002
- job_003
- job_004
job_009:
name: "unit_test; windows; Dart dev; PKG: dwds; `dart test`"
runs-on: windows-latest
steps:
- uses: dart-lang/setup-dart@v1.0
- uses: dart-lang/setup-dart@v1.2
with:
sdk: dev
- id: checkout
Expand All @@ -298,12 +343,34 @@ jobs:
- job_002
- job_003
- job_004
- job_005
job_009:
job_010:
name: "unit_test; windows; Dart dev; PKG: frontend_server_client; `dart test`"
runs-on: windows-latest
steps:
- uses: dart-lang/[email protected]
with:
sdk: dev
- id: checkout
uses: actions/[email protected]
- id: frontend_server_client_pub_upgrade
name: frontend_server_client; dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: frontend_server_client
run: dart pub upgrade
- name: frontend_server_client; dart test
if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'"
working-directory: frontend_server_client
run: dart test
needs:
- job_001
- job_002
- job_003
- job_004
job_011:
name: "unit_test; windows; Dart dev; PKG: webdev; `dart test -j 1`"
runs-on: windows-latest
steps:
- uses: dart-lang/setup-dart@v1.0
- uses: dart-lang/setup-dart@v1.2
with:
sdk: dev
- id: checkout
Expand All @@ -322,8 +389,30 @@ jobs:
- job_002
- job_003
- job_004
- job_005
job_010:
job_012:
name: "unit_test; windows; Dart stable; PKG: frontend_server_client; `dart test`"
runs-on: windows-latest
steps:
- uses: dart-lang/[email protected]
with:
sdk: stable
- id: checkout
uses: actions/[email protected]
- id: frontend_server_client_pub_upgrade
name: frontend_server_client; dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: frontend_server_client
run: dart pub upgrade
- name: frontend_server_client; dart test
if: "always() && steps.frontend_server_client_pub_upgrade.conclusion == 'success'"
working-directory: frontend_server_client
run: dart test
needs:
- job_001
- job_002
- job_003
- job_004
job_013:
name: Notify failure
runs-on: ubuntu-latest
if: "(github.event_name == 'push' || github.event_name == 'schedule') && failure()"
Expand All @@ -344,3 +433,6 @@ jobs:
- job_007
- job_008
- job_009
- job_010
- job_011
- job_012
5 changes: 5 additions & 0 deletions frontend_server_client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.1.1

- Fix a bug where spaces in the output dill path would cause a parse error when
reading the error count output.

## 2.1.0

- Support enabling experiments when starting the compiler.
Expand Down
4 changes: 2 additions & 2 deletions frontend_server_client/lib/src/frontend_server_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ class FrontendServerClient {
if (line.startsWith(feBoundaryKey)) {
state = _CompileState.done;
var parts = line.split(' ');
outputDillPath = parts[1];
errorCount = int.parse(parts[2]);
outputDillPath = parts.getRange(1, parts.length - 1).join(' ');
errorCount = int.parse(parts.last);
continue;
}
var diffUri = Uri.parse(line.substring(1));
Expand Down
10 changes: 9 additions & 1 deletion frontend_server_client/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@ stages:
- group:
- format
- analyze: --fatal-infos .
dart: [2.12.0]
dart: dev
- unit_test:
- test:
dart:
- stable
- dev
os:
- windows
- linux
2 changes: 1 addition & 1 deletion frontend_server_client/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: frontend_server_client
version: 2.1.0
version: 2.1.1
description: >-
Client code to start and interact with the frontend_server compiler from the
Dart SDK.
Expand Down
Loading