Skip to content

Commit f7e9b17

Browse files
authored
Remove unused noDefiningLibraryFound warning. (#3536)
1 parent f8bdfc8 commit f7e9b17

File tree

2 files changed

+1
-30
lines changed

2 files changed

+1
-30
lines changed

lib/src/model/package_graph.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,7 @@ class PackageGraph with CommentReferable, Nameable, ModelBuilder {
344344
var warningMessage = switch (kind) {
345345
PackageWarning.ambiguousReexport =>
346346
kind.messageFor([warnableName, message]),
347-
PackageWarning.noCanonicalFound ||
348-
PackageWarning.noDefiningLibraryFound =>
349-
kind.messageFor([warnableName]),
347+
PackageWarning.noCanonicalFound => kind.messageFor([warnableName]),
350348
PackageWarning.noLibraryLevelDocs ||
351349
PackageWarning.noDocumentableLibrariesInPackage =>
352350
kind.messageFor([warnable!.fullyQualifiedName]),

lib/src/warnings.dart

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -160,31 +160,6 @@ const Map<PackageWarning, PackageWarningDefinition> packageWarningDefinitions =
160160
'A symbol is part of the public interface for this package, but no '
161161
'library documented with this package documents it so dartdoc can '
162162
'not link to it'),
163-
PackageWarning.noDefiningLibraryFound: PackageWarningDefinition(
164-
PackageWarning.noDefiningLibraryFound,
165-
'no-defining-library-found',
166-
'The defining library for an element could not be found; the library may '
167-
'be imported or exported with a non-standard URI',
168-
longHelp:
169-
'For non-canonicalized import or export paths, dartdoc can sometimes '
170-
'lose track of the defining library for an element. If this happens, '
171-
'canonicalization will assume that reexported elements are defined '
172-
'somewhere it deems "reasonable," defaulting first to the enclosing '
173-
"context's `definingLibrary` if available, or the library in which it "
174-
'is visible. This can lead to confusing documentation structure that '
175-
'implies duplicate code where none exists.'
176-
'\n\n'
177-
'To correct this, canonicalize all paths in the import or export chain '
178-
'making this symbol visible.'
179-
'\n\n'
180-
'For example: change '
181-
"`import 'package:dartdoc/src/model/../model/extension_target.dart';` "
182-
"to `import 'package:dartdoc/src/model/extension_target.dart';` "
183-
"or `import 'src/../src/foo.dart';` to `import 'src/foo.dart'; "
184-
"or `import 'package:dartdoc//lib//foo.dart';` to "
185-
"`import 'package:dartdoc/lib/foo.dart';`.",
186-
defaultWarningMode: PackageWarningMode.error,
187-
),
188163
PackageWarning.notImplemented: PackageWarningDefinition(
189164
PackageWarning.notImplemented,
190165
'not-implemented',
@@ -344,8 +319,6 @@ enum PackageWarning {
344319
// TODO(jcollins-g): pipeline references through `linkedName` for error
345320
// messages and warn for non-public canonicalization errors.
346321
noCanonicalFound('no canonical library found for {0}, not linking'),
347-
noDefiningLibraryFound('could not find the defining library for {0}; the '
348-
'library may be imported or exported with a non-standard URI'),
349322
notImplemented('{0}'),
350323
noDocumentableLibrariesInPackage('{0} has no documentable libraries'),
351324
noLibraryLevelDocs('{0} has no library level documentation comments'),

0 commit comments

Comments
 (0)