Skip to content

Commit 983e272

Browse files
authored
Merge branch 'main' into merge-term_glyph-package
2 parents 1d99aaa + 4dcd4d9 commit 983e272

File tree

112 files changed

+2564
-910
lines changed

Some content is hidden

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

112 files changed

+2564
-910
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: "package:test_reflective_loader"
3+
about: "Create a bug or file a feature request against package:test_reflective_loader."
4+
labels: "package:test_reflective_loader"
5+
---

.github/ISSUE_TEMPLATE/timing.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: "package:timing"
3+
about: "Create a bug or file a feature request against package:timing."
4+
labels: "package:timing"
5+
---

.github/labeler.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,14 @@
112112
- changed-files:
113113
- any-glob-to-any-file: 'pkgs/term_glyph/**'
114114

115+
'package:test_reflective_loader':
116+
- changed-files:
117+
- any-glob-to-any-file: 'pkgs/test_reflective_loader/**'
118+
119+
'package:timing':
120+
- changed-files:
121+
- any-glob-to-any-file: 'pkgs/timing/**'
122+
115123
'package:unified_analytics':
116124
- changed-files:
117125
- any-glob-to-any-file: 'pkgs/unified_analytics/**'

.github/workflows/bazel_worker.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
3737
with:
3838
sdk: ${{ matrix.sdk }}
39+
- run: dart pub get
3940
- run: "dart format --output=none --set-exit-if-changed ."
41+
if: ${{ matrix.sdk == 'dev' }}
4042
- name: Test
4143
run: ./tool/travis.sh
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: package:test_reflective_loader
2+
3+
on:
4+
# Run on PRs and pushes to the default branch.
5+
push:
6+
branches: [ main ]
7+
paths:
8+
- '.github/workflows/test_reflective_loader.yaml'
9+
- 'pkgs/test_reflective_loader/**'
10+
pull_request:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/test_reflective_loader.yaml'
14+
- 'pkgs/test_reflective_loader/**'
15+
schedule:
16+
- cron: "0 0 * * 0"
17+
18+
env:
19+
PUB_ENVIRONMENT: bot.github
20+
21+
defaults:
22+
run:
23+
working-directory: pkgs/test_reflective_loader/
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
sdk: [dev, 3.1]
32+
33+
steps:
34+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
35+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
36+
with:
37+
sdk: ${{ matrix.sdk }}
38+
39+
- run: dart pub get
40+
- name: dart format
41+
run: dart format --output=none --set-exit-if-changed .
42+
- run: dart analyze --fatal-infos
43+
- run: dart test

.github/workflows/timing.yaml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: package:timing
2+
3+
on:
4+
# Run on PRs and pushes to the default branch.
5+
push:
6+
branches: [ main ]
7+
paths:
8+
- '.github/workflows/timing.yaml'
9+
- 'pkgs/timing/**'
10+
pull_request:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/timing.yaml'
14+
- 'pkgs/timing/**'
15+
schedule:
16+
- cron: "0 0 * * 0"
17+
18+
env:
19+
PUB_ENVIRONMENT: bot.github
20+
21+
22+
defaults:
23+
run:
24+
working-directory: pkgs/timing/
25+
26+
jobs:
27+
# Check code formatting and static analysis on a single OS (linux)
28+
# against Dart dev.
29+
analyze:
30+
runs-on: ubuntu-latest
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
sdk: [3.4, dev]
35+
steps:
36+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
37+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
38+
with:
39+
sdk: ${{ matrix.sdk }}
40+
- id: install
41+
run: dart pub get
42+
- run: dart format --output=none --set-exit-if-changed .
43+
if: always() && steps.install.outcome == 'success'
44+
- run: dart analyze --fatal-infos
45+
if: always() && steps.install.outcome == 'success'
46+
47+
# Run tests on a matrix consisting of two dimensions:
48+
# 1. OS: ubuntu-latest, (macos-latest, windows-latest)
49+
# 2. release channel: dev, 2.2.0
50+
test:
51+
needs: analyze
52+
runs-on: ${{ matrix.os }}
53+
strategy:
54+
fail-fast: false
55+
matrix:
56+
# Add macos-latest and/or windows-latest if relevant for this package.
57+
os: [ubuntu-latest]
58+
sdk: [3.4, dev]
59+
steps:
60+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
61+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
62+
with:
63+
sdk: ${{ matrix.sdk }}
64+
- id: install
65+
run: dart pub get
66+
- run: dart test --platform vm
67+
if: always() && steps.install.outcome == 'success'

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ don't naturally belong to other topic monorepos (like
4141
| [source_span](pkgs/source_span/) | Provides a standard representation for source code locations and spans. | [![package issues](https://img.shields.io/badge/package:source_span-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Asource_span) | [![pub package](https://img.shields.io/pub/v/source_span.svg)](https://pub.dev/packages/source_span) |
4242
| [sse](pkgs/sse/) | Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST requests. | [![package issues](https://img.shields.io/badge/package:sse-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Asse) | [![pub package](https://img.shields.io/pub/v/sse.svg)](https://pub.dev/packages/sse) |
4343
| [term_glyph](pkgs/term_glyph/) | Useful Unicode glyphs and ASCII substitutes. | [![package issues](https://img.shields.io/badge/package:term_glyph-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aterm_glyph) | [![pub package](https://img.shields.io/pub/v/term_glyph.svg)](https://pub.dev/packages/term_glyph) |
44+
| [test_reflective_loader](pkgs/test_reflective_loader/) | Support for discovering tests and test suites using reflection. | [![package issues](https://img.shields.io/badge/package:test_reflective_loader-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Atest_reflective_loader) | [![pub package](https://img.shields.io/pub/v/test_reflective_loader.svg)](https://pub.dev/packages/test_reflective_loader) |
45+
| [timing](pkgs/timing/) | A simple package for tracking the performance of synchronous and asynchronous actions. | [![package issues](https://img.shields.io/badge/package:timing-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Atiming) | [![pub package](https://img.shields.io/pub/v/timing.svg)](https://pub.dev/packages/timing) |
4446
| [unified_analytics](pkgs/unified_analytics/) | A package for logging analytics for all Dart and Flutter related tooling to Google Analytics. | [![package issues](https://img.shields.io/badge/package:unified_analytics-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aunified_analytics) | [![pub package](https://img.shields.io/pub/v/unified_analytics.svg)](https://pub.dev/packages/unified_analytics) |
4547

4648
## Publishing automation

pkgs/bazel_worker/benchmark/benchmark.dart

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ Future<void> main() async {
1212
var path = 'blaze-bin/some/path/to/a/file/that/is/an/input/$i';
1313
workRequest
1414
..arguments.add('--input=$path')
15-
..inputs.add(Input(
16-
path: '',
17-
digest: List.filled(70, 0x11),
18-
));
15+
..inputs.add(Input(path: '', digest: List.filled(70, 0x11)));
1916
}
2017

2118
// Serialize it.
@@ -24,14 +21,20 @@ Future<void> main() async {
2421
print('Request has $length requestBytes.');
2522

2623
// Add the length in front base 128 encoded as in the worker protocol.
27-
requestBytes =
28-
Uint8List.fromList(requestBytes.toList()..insertAll(0, _varInt(length)));
24+
requestBytes = Uint8List.fromList(
25+
requestBytes.toList()..insertAll(0, _varInt(length)),
26+
);
2927

3028
// Split into 10000 byte chunks.
3129
var lists = <Uint8List>[];
3230
for (var i = 0; i < requestBytes.length; i += 10000) {
33-
lists.add(Uint8List.sublistView(
34-
requestBytes, i, min(i + 10000, requestBytes.length)));
31+
lists.add(
32+
Uint8List.sublistView(
33+
requestBytes,
34+
i,
35+
min(i + 10000, requestBytes.length),
36+
),
37+
);
3538
}
3639

3740
// Time `AsyncMessageGrouper` and deserialization.

pkgs/bazel_worker/e2e_test/bin/async_worker_in_isolate.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ import 'package:e2e_test/forwards_to_isolate_async_worker.dart';
1717
Future main(List<String> args, [SendPort? message]) async {
1818
var receivePort = ReceivePort();
1919
await Isolate.spawnUri(
20-
Uri.file('async_worker.dart'), [], receivePort.sendPort);
20+
Uri.file('async_worker.dart'),
21+
[],
22+
receivePort.sendPort,
23+
);
2124

2225
var worker = await ForwardsToIsolateAsyncWorker.create(receivePort);
2326
await worker.run();

pkgs/bazel_worker/e2e_test/lib/async_worker.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ class ExampleAsyncWorker extends AsyncWorkerLoop {
1616

1717
@override
1818
Future<WorkResponse> performRequest(WorkRequest request) async {
19-
return WorkResponse(
20-
exitCode: 0,
21-
output: request.arguments.join('\n'),
22-
);
19+
return WorkResponse(exitCode: 0, output: request.arguments.join('\n'));
2320
}
2421
}

0 commit comments

Comments
 (0)