Skip to content

Upgrading dartdoc 7 to 8

Breaking7.0.2 → 8.3.4Breaking24Platform3Deprecated7New14Changed32Fixed27Other6

BreakingUpgrade verdict

24 breaking changes and 3 platform requirement changes.

  • Documentation comments can no longer link to the containing element using `[this]`; write `this [Foo]` or use backticks around `this` instead.
  • Removes the unnecessary Privacy mixin.
  • The `@example` tag no longer works in documentation comments.
  • Libraries no longer get an explicit name assigned by dartdoc.
Top 5 of 34 that need code or config changes

Dart SDK requirement changed in 8.3.3: ^3.0.0 → ^3.6.0.

Drops cli_util.

Moves analyzer ^6.3.0 → ^7.4.4, markdown ^7.1.0 → ^7.2.1. Your build may pick other versions.

Breaking24
Removes support for [this] as a comment reference.
[this]
Removes the unnecessary Privacy mixin.
Privacy
Removes support for the @example directive.
@example
Removes explicit library names.
Removes the --format flag that allowed generating Markdown-formatted docs.
--format
Removes @hideConstantImplementations fully.
@hideConstantImplementations
Removes the Class assert for ClassTypedef.
ClassClassTypedef
Removes the image directive.
image
Removes the samples directive.
samples
Removes the api directive.
api
Removes ElementType.canHaveParameters.
ElementType.canHaveParameters
Removes DefinedElementType.element and DefinedElementType.isParameterType.
DefinedElementType.elementDefinedElementType.isParameterType
Moves library page URLs from "library-name-library.html" to "index.html" in the same directory, leaving a redirect at the old location.
Makes ContainerAccessor.isInherited a final field.
ContainerAccessor.isInherited
Makes PackageGraph.analysisContext a private field.
PackageGraph.analysisContext
Makes CommentReferenceParser.codeRef private.
CommentReferenceParser.codeRef
Makes PackageGraph.allLibraries private.
PackageGraph.allLibraries
Makes almost all elements in package_builder private.
package_builder
Makes several members on PackageGraph private.
PackageGraph
Makes packageName, name, libraryName, and specialFileUri private in SpecialClass.
SpecialClasspackageNamenamelibraryNamespecialFileUri
Makes PackageMeta.pathContext private.
PackageMeta.pathContext
Makes ElementType subclass constructors private.
ElementType
Makes TypeImplementing.directInterfaces private.
TypeImplementing.directInterfaces
Restricts InheritingContainer members hasPublicInheritedMethods, inheritedFields, publicInheritedFields, and publicInheritedMethods to testing only.
InheritingContainerhasPublicInheritedMethodsinheritedFieldspublicInheritedFieldspublicInheritedMethods
Platform3
Requires Dart 3.6 or later.
Requires Dart 3.5 or later.
Requires Dart 3.2.0 or later.
Deprecated7
Deprecates the missingCodeBlockLanguage warning in favor of the missing_code_block_language_in_doc_comment lint rule.
missingCodeBlockLanguagemissing_code_block_language_in_doc_comment
Deprecates the --nodoc option.
--nodoc
Deprecates the --resources-dir option.
--resources-dir
Deprecates the --include-externals option.
--include-externals
Deprecates the --templates-dir option.
--templates-dir
Deprecates options.dart ahead of removal in the next major release.
options.dart
Deprecates public exports in lib/dartdoc.dart ahead of removal in the next major release.
lib/dartdoc.dart