Skip to content

Commit

Permalink
Remove check on web_dev_compilers (#19)
Browse files Browse the repository at this point in the history
Going for a more general model
  • Loading branch information
kevmoo authored Mar 23, 2018
1 parent 3e31039 commit 8515176
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 49 deletions.
5 changes: 5 additions & 0 deletions webdev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.1.2

- Remove check for `build_web_compilers`. Allows general support for
`build_runner` from tools.

## 0.1.1

- Checks for a dependency on `build_web_compilers`.
Expand Down
11 changes: 0 additions & 11 deletions webdev/lib/src/pubspec.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ class PackageExceptionDetails {
'You must have a dependency on `build_runner` in `pubspec.yaml`. '
'It can be in either `dependencies` or `dev_dependencies`.');

static const noBuildWebCompilersDep = const PackageExceptionDetails._(
'A dependency on `build_web_compilers` was not found.',
description:
'You must have a dependency on `build_web_compilers` in `pubspec.yaml` '
'or transitively via another dependency.');

@override
String toString() => [error, description].join('\n');
}
Expand Down Expand Up @@ -87,11 +81,6 @@ Future checkPubspecLock() async {
}
}

var buldWebCompilers = packages['build_web_compilers'];
if (buldWebCompilers == null) {
issues.add(PackageExceptionDetails.noBuildWebCompilersDep);
}

if (issues.isNotEmpty) {
throw new PackageException._(issues);
}
Expand Down
2 changes: 1 addition & 1 deletion webdev/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: webdev
version: 0.1.1
version: 0.1.2-dev
author: Dart Team <misc@dartlang.org>
homepage: https://github.com/dart-lang/webdev
description: >-
Expand Down
37 changes: 0 additions & 37 deletions webdev/test/integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,29 +71,6 @@ packages:
}
});

test('should fail with no `build_web_compilers` dependency', () async {
await d.file('pubspec.lock', '''
# Copy-pasted from a valid run
packages:
build_runner:
dependency: "direct main"
description:
name: build_runner
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.0"
''').create();

var process = await TestProcess.start('dart', [_webdevBin, 'build'],
workingDirectory: d.sandbox);

await expectLater(
process.stdout, emits('Could not run in the current directory.'));
await expectLater(process.stdout,
emits('A dependency on `build_web_compilers` was not found.'));
await process.shouldExit(78);
});

test('should fail gracefully if there is no .packages file', () async {
await d.file('pubspec.lock', '''
# Copy-pasted from a valid run
Expand All @@ -105,13 +82,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.0"
build_web_compilers:
dependency: "direct main"
description:
name: build_web_compilers
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.4+2"
''').create();

var process = await TestProcess.start('dart', [_webdevBin, 'build'],
Expand All @@ -135,13 +105,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.0"
build_web_compilers:
dependency: "direct main"
description:
name: build_web_compilers
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.4+2"
''').create();

await d.file('.packages', '').create();
Expand Down

0 comments on commit 8515176

Please sign in to comment.