Releases: kampute/doc-toolkit
2.2.1
This release addresses an issue affecting links to referenced assets in generated topics.
- Fixed a problem where an asset file referenced in a topic would result in a broken link if both files were in the same source folder but the topic output folder was different. The resolution logic now correctly maintains the link to the referenced asset across divergent output paths.
2.2.0
This release improves topic resolution, hyperlink handling, and test coverage, with a focus on correctness, clarity, and more realistic URL behavior.
- Added the
TryFindByPartialIdmethod to theTopicCollectionclass to provide unique partial topic ID lookups; it is now used as a fallback in theTryResolvemethod. - Improved hyperlink resolution in the
WithResolvedHyperlinkmethod of theSeeAlsoCommentclass, including better handling of absolute and relative URLs. - Enhanced
MockHelperto better simulate real file and URL resolution for mocked address providers. - Refactored
XmlDocExtensionsTeststo use local test types and added coverage for overload documentation. - Expanded and revised unit tests for
SeeAlsoCommenthyperlink resolution.
2.1.0
This release introduces a new mechanism for tracking non-API URLs referenced in XML comments and documentation topics. It adds infrastructure to capture URL references and their context, enabling validation and analysis of documentation links.
- Introduced the
UrlReferenceclass to represent and encapsulate non-API URLs referenced in documentation, including their context and resolved URL. - Added the
UrlReferenceCollectorclass, which implements and decoratesIUrlTransformerto record all processed URLs, enabling validation and analysis of documentation links. - Updated the
DocumentationContextclass to support customizable URL transformers by introducing the newCreateUrlTransformermethod, allowing the default behavior to be overridden.
2.0.1
This release addresses a set of correctness bugs in the handling of constructors and compiler-generated methods.
-
Improved detection of compiler-generated bridge methods
Fixed a bug where compiler-generated bridge methods were not detected correctly when the underlying methods were generic. This caused such methods to incorrectly appear in the list of a type’s declared methods. The detection logic now correctly handles both generic and non-generic cases. -
Corrected semantics for default constructor identification
Fixed a bug in the definition of default constructors. Previously, only public parameterless constructors were classified as default. The logic now correctly treats any instance parameterless constructor as default, regardless of visibility, aligning behavior with C# language semantics. -
Corrected handling of undocumented default constructors
Fixed a bug where models for classes and structs could include undocumented default constructors, even though these constructors were compiler-generated. These constructors are now correctly excluded from the constructor list, improving the accuracy of generated API documentation.
2.0.0
This release updates the library to support new language and runtime features introduced in .NET 9.0 and 10.0. The update extends the type system model, improves resolution and performance characteristics.
New Features
- Implemented support for extension blocks and extension block members
- Extended the type system to model static interface members and nested types
- Implemented handling of compound assignment operator overloads
- Integrated the
allows ref structgeneric type constraint
Bug Fixes
- Fixed an issue caused by loading reflection metadata for assemblies referenced by assemblies that were already loaded
- Corrected the
IsAssignableFrommethod's behavior for generic types with covariant and contravariant type parameters - Fixed an error when resolving XML documentation URLs for types associated with fixed buffer fields
Improvements
- Optimized resolving members via code references
- Reorganized types and members used as test fixtures to improve maintainability and coverage
- General internal refactoring and performance optimizations
Breaking Changes
- The
XmlDocProviderclass no longer loads XML documentation content, which is now delegated to theXmlDocRepositoryclass - Removed the
IsSubstitutableBymethod from theITypeinterface and introduced theIsSatisfiableBymethod (two overloads) on theITypeParameterinterface as its replacement - Removed the
AsCachedextension method fromIXmlDocProvider, caching now handled at the repository and model layers - Removed models specific to primitive types, with primitive classification now exposed via the
IsPrimitiveproperty on theITypeinterface - The
IInterfaceTypeinterface now extends theICompositeTypeinterface - Renamed the
UnqualifiedNameproperty of theIGenericCapableTypeinterface toSimpleNameto prevent ambiguity - Renamed the
ReplaceManyandRemoveManymethods ofStringManipulationtoReplaceCharsandRemoveCharsto better indicate their purpose - Fixed a naming typo by renaming
ParametericSignaturetoParametricSignatureon theITypeinterface
These breaking changes primarily affecting lower-level and infrastructure APIs. They do not affect consumers that rely exclusively on higher-level APIs.
1.1.1
This release focuses exclusively on addressing several reliability and correctness issues uncovered in recent iterations.
-
Enhanced assembly resolution strategy
Fixed a bug where the assembly loader could resolve to an incorrect or incompatible version when probing for assemblies. The resolution logic now prioritizes exact version matches to ensure the correct assembly is loaded. -
Corrected owned type argument calculation for nested generic types
Fixed a bug where generic types nested beyond a single level did not correctly compute their owned type argument counts. The logic now properly determines the exact number of type arguments for each nesting depth. -
Refactored custom attribute argument handling
Fixed a bug where the system attempted to construct runtime types when processing array arguments in custom attributes, causing runtime errors. The logic now avoids type construction and ensures correct representation of array and nested values. -
Improved detection of explicit interface implementations
Updated the member-matching logic to exclude compiler-generated bridge methods emitted for by-reference parameter variations, ensuring that user-written explicit interface implementations are identified accurately. -
Improved qualification of explicitly implemented interface members
Clarified name resolution for explicitly implemented interface members to eliminate ambiguity between implementing member names and their corresponding interface member names.
1.1.0
This release includes bug fixes, feature additions, and internal refactoring to improve functionality and maintainability.
Bug Fixes
- Fixed assembly resolution for assemblies with NuGet package references.
- Corrected signature generation for parameters with generic types.
- Updated
DocumentAddressProviderto support assemblies for better URL resolution.
Enhancements
- Added an option to omit missing summary tags for implicit default constructors.
- Added an implicit conversion operator for
MemberModel<T>to its underlying metadata type.
Refactoring
- Changed
IAssemblyto use a dictionary for namespace management. - Removed the
IWithTypeParametersinterface and cleaned up unused code inConstructorModel.
All changes have been validated with existing tests. No breaking changes to the public API.
1.0.0
Initial release of Kampute.DocToolkit, providing an extensible pipeline for extracting and transforming .NET assembly metadata and XML documentation into structured, linkable, and customizable models.
The library does not generate documentation directly, but supplies the complete data needed for rendering documentation in any desired format.