Skip to content

Commit 0fde652

Browse files
authored
Breaking changes for build 4.0.0, release. (#4177)
1 parent 5dfa820 commit 0fde652

Some content is hidden

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

51 files changed

+153
-363
lines changed

build/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 4.0.0
2+
3+
- Remove methods and classes deprecated in `4.0.0`.
4+
- Make `AssetReader.digest` abstract.
5+
- Remove unused deps: `async`, `build_runner_core`, `convert`.
6+
17
## 3.1.0
28

39
- Deprecate `runBuilder`. It has been moved to `package:build_runner_core` and

build/lib/build.dart

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,16 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
export 'src/analyzer/resolver.dart';
6-
export 'src/asset/exceptions.dart';
7-
export 'src/asset/id.dart';
8-
export 'src/asset/reader.dart';
9-
export 'src/asset/writer.dart';
10-
export 'src/builder/build_step.dart';
11-
export 'src/builder/builder.dart';
12-
export 'src/builder/exceptions.dart';
13-
export 'src/builder/file_deleting_builder.dart' show FileDeletingBuilder;
14-
export 'src/builder/logging.dart' show log;
15-
export 'src/builder/multiplexing_builder.dart';
16-
export 'src/builder/post_process_build_step.dart';
17-
export 'src/builder/post_process_builder.dart';
18-
export 'src/generate/expected_outputs.dart';
19-
export 'src/generate/run_builder.dart';
20-
export 'src/generate/run_post_process_builder.dart';
21-
export 'src/resource/resource.dart';
5+
export 'src/asset_id.dart';
6+
export 'src/build_step.dart';
7+
export 'src/builder.dart';
8+
export 'src/exceptions.dart';
9+
export 'src/expected_outputs.dart';
10+
export 'src/file_deleting_builder.dart';
11+
export 'src/logging.dart' show log;
12+
export 'src/post_process_build_step.dart';
13+
export 'src/post_process_builder.dart';
14+
export 'src/reader.dart';
15+
export 'src/resolver.dart';
16+
export 'src/resource.dart';
17+
export 'src/writer.dart';

build/lib/src/asset/id.dart renamed to build/lib/src/asset_id.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
4+
45
import 'package:path/path.dart' as p;
56

67
/// Identifies an asset within a package.

build/lib/src/builder/build_step.dart renamed to build/lib/src/build_step.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import 'dart:convert';
99
import 'package:analyzer/dart/element/element2.dart';
1010
import 'package:package_config/package_config_types.dart';
1111

12-
import '../analyzer/resolver.dart';
13-
import '../asset/id.dart';
14-
import '../asset/reader.dart';
15-
import '../asset/writer.dart';
16-
import '../resource/resource.dart';
12+
import 'asset_id.dart';
13+
import 'reader.dart';
14+
import 'resolver.dart';
15+
import 'resource.dart';
16+
import 'writer.dart';
1717

1818
/// A single step in a build process.
1919
///

build/lib/src/builder/builder.dart renamed to build/lib/src/builder.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
4+
45
import 'dart:async';
56

67
import 'build_step.dart';

build/lib/src/builder/exceptions.dart

Lines changed: 0 additions & 16 deletions
This file was deleted.

build/lib/src/builder/multiplexing_builder.dart

Lines changed: 0 additions & 54 deletions
This file was deleted.

build/lib/src/asset/exceptions.dart renamed to build/lib/src/exceptions.dart

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
4-
import 'id.dart';
4+
5+
import 'asset_id.dart';
56

67
class AssetNotFoundException implements Exception {
78
final AssetId assetId;
@@ -86,3 +87,15 @@ class UnresolvableAssetException implements Exception {
8687
@override
8788
String toString() => 'Unresolvable Asset from $description.';
8889
}
90+
91+
class UnexpectedOutputException implements Exception {
92+
final AssetId assetId;
93+
final Iterable<AssetId>? expected;
94+
95+
UnexpectedOutputException(this.assetId, {this.expected});
96+
97+
@override
98+
String toString() =>
99+
'UnexpectedOutputException: $assetId'
100+
'${expected == null ? '' : '\nExpected only: $expected'}';
101+
}

build/lib/src/generate/expected_outputs.dart renamed to build/lib/src/expected_outputs.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
4-
import '../asset/id.dart';
5-
import '../builder/builder.dart';
4+
5+
import 'asset_id.dart';
6+
import 'builder.dart';
67

78
/// Collects the expected AssetIds created by [builder] when given [input] based
89
/// on the extension configuration.
File renamed without changes.

0 commit comments

Comments
 (0)