
* Update project.pbxproj files to say Flutter rather than Chromium Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright. * Update the copyright notice checker to require a standard notice on all files * Update copyrights on Dart files. (This was a mechanical commit.) * Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine. Some were already marked "The Flutter Authors", not clear why. Their dates have been normalized. Some were missing the blank line after the license. Some were randomly different in trivial ways for no apparent reason (e.g. missing the trailing period). * Clean up the copyrights in non-Dart files. (Manual edits.) Also, make sure templates don't have copyrights. * Fix some more ORGANIZATIONNAMEs
96 lines
2.7 KiB
Dart
96 lines
2.7 KiB
Dart
// Copyright 2014 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import '../base/file_system.dart';
|
|
|
|
import 'build_system.dart';
|
|
|
|
/// An exception thrown when a rule declares an input that does not exist on
|
|
/// disk.
|
|
class MissingInputException implements Exception {
|
|
const MissingInputException(this.missing, this.target);
|
|
|
|
/// The file or directory we expected to find.
|
|
final List<File> missing;
|
|
|
|
/// The name of the target this file should have been output from.
|
|
final String target;
|
|
|
|
@override
|
|
String toString() {
|
|
final String files = missing.map((File file) => file.path).join(', ');
|
|
return '$files were declared as an inputs, but did not exist. '
|
|
'Check the definition of target:$target for errors';
|
|
}
|
|
}
|
|
|
|
/// An exception thrown if we detect a cycle in the dependencies of a target.
|
|
class CycleException implements Exception {
|
|
CycleException(this.targets);
|
|
|
|
final Set<Target> targets;
|
|
|
|
@override
|
|
String toString() => 'Dependency cycle detected in build: '
|
|
'${targets.map((Target target) => target.name).join(' -> ')}';
|
|
}
|
|
|
|
/// An exception thrown when a pattern is invalid.
|
|
class InvalidPatternException implements Exception {
|
|
InvalidPatternException(this.pattern);
|
|
|
|
final String pattern;
|
|
|
|
@override
|
|
String toString() => 'The pattern "$pattern" is not valid';
|
|
}
|
|
|
|
/// An exception thrown when a rule declares an output that was not produced
|
|
/// by the invocation.
|
|
class MissingOutputException implements Exception {
|
|
const MissingOutputException(this.missing, this.target);
|
|
|
|
/// The files we expected to find.
|
|
final List<File> missing;
|
|
|
|
/// The name of the target this file should have been output from.
|
|
final String target;
|
|
|
|
@override
|
|
String toString() {
|
|
final String files = missing.map((File file) => file.path).join(', ');
|
|
return '$files were declared as outputs, but were not generated by '
|
|
'the action. Check the definition of target:$target for errors';
|
|
}
|
|
}
|
|
|
|
/// An exception thrown when in output is placed outside of
|
|
/// [Environment.buildDir].
|
|
class MisplacedOutputException implements Exception {
|
|
MisplacedOutputException(this.path, this.target);
|
|
|
|
final String path;
|
|
final String target;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'Target $target produced an output at $path'
|
|
' which is outside of the current build or project directory';
|
|
}
|
|
}
|
|
|
|
/// An exception thrown if a build action is missing a required define.
|
|
class MissingDefineException implements Exception {
|
|
MissingDefineException(this.define, this.target);
|
|
|
|
final String define;
|
|
final String target;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'Target $target required define $define '
|
|
'but it was not provided';
|
|
}
|
|
}
|