Fix type mapping for equivalent signatures in API comparison #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR resolves GitHub Issue #40 where type mappings weren't working correctly for generic parameters and equivalent signatures.
Problem
Type mappings like
"RedisValue": "ValkeyValue"were configured but still showing as differences in the comparison results. The issue was that equivalent signatures should not appear as differences at all when types are properly mapped.Root Cause
The issue had two parts:
CalculateTypeChangeswas comparing raw signatures without considering type mappingsSolution
Key Changes
signaturesEquivalentparameter toCalculateTypeChangesmethodInterface Changes
IDifferenceCalculator.CalculateTypeChangesnow accepts optionalsignaturesEquivalentparameterfalseResults
RedisValuevsValkeyValueno longer show as differencesValidation
Tested with real-world scenario comparing StackExchange.Redis vs Valkey.Glide assemblies:
The mapped types (
ValkeyValue,ValkeyKey,ValkeyResult, etc.) no longer appear anywhere in the differences report, confirming the fix works correctly.Fixes #40