Skip to content

Commit

Permalink
Address old TODO (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough committed Jan 4, 2021
1 parent 445a4a8 commit 9febd1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
3 changes: 1 addition & 2 deletions lib/src/discover_tasks.dart
Expand Up @@ -101,8 +101,7 @@ class TaskDiscovery {
'Task `$name` references invalid task method '
'`$depMethodName` as a dependency');
}
if (!resolvedDeclarations.values
.any((decl) => declarationsEqual(decl, depMethod))) {
if (!resolvedDeclarations.values.any((decl) => decl == depMethod)) {
var depName = annotatedMethodTask.task.name;
var depLib = MirrorSystem.getName(depMethod.owner!.qualifiedName);
throw GrinderException(
Expand Down
9 changes: 1 addition & 8 deletions lib/src/utils.dart
Expand Up @@ -46,7 +46,7 @@ String camelToDashes(String input) {
.join('-');
}

// Upper-case or lower-case the first charater of a String.
// Upper-case or lower-case the first character of a String.
String withCapitalization(String s, bool capitalized) {
if (s.isEmpty) return s;
var firstLetter = s[0];
Expand All @@ -55,13 +55,6 @@ String withCapitalization(String s, bool capitalized) {
return firstLetter + s.substring(1);
}

// TODO: Remove this once this `dart:mirrors` bug is fixed:
// http://dartbug.com/22601
bool declarationsEqual(DeclarationMirror decl1, decl2) =>
decl2 is DeclarationMirror &&
decl1.owner == decl2.owner &&
decl1.simpleName == decl2.simpleName;

Map<Symbol, DeclarationMirror> resolveExportedDeclarations(
LibraryMirror library) {
final resolvedDeclarations = <Symbol, DeclarationMirror>{};
Expand Down

0 comments on commit 9febd1e

Please sign in to comment.