Skip to content
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
420 changes: 210 additions & 210 deletions .github/workflows/dart.yml

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions _test/test/goldens/generated_build_script.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,6 @@ final _builders = <_i1.BuilderApplication>[
hideOutput: true,
appliesBuilders: const [r'build_modules:module_cleanup'],
),
_i1.apply(
r'build_web_compilers:dart2js_modules',
[
_i3.dart2jsMetaModuleBuilder,
_i3.dart2jsMetaModuleCleanBuilder,
_i3.dart2jsModuleBuilder,
],
_i1.toNoneByDefault(),
isOptional: true,
hideOutput: true,
appliesBuilders: const [r'build_modules:module_cleanup'],
),
_i1.apply(
r'build_web_compilers:ddc_modules',
[
Expand Down Expand Up @@ -102,6 +90,18 @@ final _builders = <_i1.BuilderApplication>[
r'build_web_compilers:dart_source_cleanup',
],
),
_i1.apply(
r'build_web_compilers:dart2js_modules',
[
_i3.dart2jsMetaModuleBuilder,
_i3.dart2jsMetaModuleCleanBuilder,
_i3.dart2jsModuleBuilder,
],
_i1.toNoneByDefault(),
isOptional: true,
hideOutput: true,
appliesBuilders: const [r'build_modules:module_cleanup'],
),
_i1.apply(
r'build_web_compilers:entrypoint',
[_i3.webEntrypointBuilder],
Expand Down
4 changes: 4 additions & 0 deletions build_runner/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.4.4

- Use a stable order for builders without an order defined by dependencies.

## 2.4.3

- Make the `doctor` command visible.
Expand Down
23 changes: 11 additions & 12 deletions build_runner/lib/src/build_script_generate/builder_ordering.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,17 @@ Iterable<BuilderDefinition> findBuilderOrder(
consistentOrderBuilders.where((child) =>
_hasInputDependency(parent, child) ||
_mustRunBefore(parent, child, globalBuilderConfigs));
var components = stronglyConnectedComponents<BuilderDefinition>(
consistentOrderBuilders,
dependencies,
equals: (a, b) => a.key == b.key,
hashCode: (b) => b.key.hashCode,
);
return components.map((component) {
if (component.length > 1) {
throw ArgumentError('Required input cycle for ${component.toList()}');
}
return component.single;
}).toList();
try {
return topologicalSort<BuilderDefinition>(
consistentOrderBuilders,
dependencies,
equals: (a, b) => a.key == b.key,
hashCode: (b) => b.key.hashCode,
secondarySort: (a, b) => a.key.compareTo(b.key),
).reversed;
} on CycleException<BuilderDefinition> catch (e) {
throw ArgumentError('Required input cycle for ${e.cycle}');
}
}

/// Whether [parent] has a `required_input` that wants to read outputs produced
Expand Down
2 changes: 1 addition & 1 deletion build_runner/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ stages:
- test: -x integration --test-randomize-ordering-seed=random
- test: -P experiments --test-randomize-ordering-seed=random
sdk:
- 3.0.0-277.0.dev
- dev
- e2e_test:
# TODO: enable stack trace chaining https://github.com/dart-lang/build/issues/2894
- test: -t integration --total-shards 5 --shard-index 0 --test-randomize-ordering-seed=random --no-chain-stack-traces -j 1
Expand Down
6 changes: 3 additions & 3 deletions build_runner/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: build_runner
version: 2.4.3
version: 2.4.4
description: A build system for Dart code generation and modular compilation.
repository: https://github.com/dart-lang/build/tree/master/build_runner

environment:
sdk: ">=3.0.0-134.0.dev <4.0.0"
sdk: ^3.0.0

platforms:
linux:
Expand All @@ -26,7 +26,7 @@ dependencies:
dart_style: ^2.0.0
frontend_server_client: ^3.0.0
glob: ^2.0.0
graphs: ^2.0.0
graphs: ^2.2.0
http_multi_server: ^3.0.0
io: ^1.0.0
js: ^0.6.3
Expand Down
2 changes: 1 addition & 1 deletion tool/ci.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.