external-library-version-mismatch
@azure-tools/typespec-client-generator-core/external-library-version-mismatchSeverity: warning
This diagnostic is issued when external @alternateType metadata refers to the same external package with more than one minimum version.
Impact
Section titled “Impact”- Area: Language-specific external type dependencies. Generation continues, but the targeted emitter may receive conflicting minimum versions for the same external package.
- Not affected: The TypeSpec source types and service payload schema are unchanged.
❌ Incorrect Usage
Section titled “❌ Incorrect Usage”@alternateType( { identity: "pystac.Item", package: "pystac", minVersion: "1.12.0", }, "python")model Item {}
@alternateType( { identity: "pystac.Collection", package: "pystac", minVersion: "1.13.0", // mismatches the earlier `pystac` minVersion `1.12.0` }, "python")model Collection {}Diagnostic Message
Section titled “Diagnostic Message”TCGC reports:
External library version mismatch. There are multiple versions of pystac: 1.12.0 and 1.13.0. Please unify the versions.✅ How to Fix
Section titled “✅ How to Fix”Use one package version for all external alternate type declarations that reference the same package.
@alternateType( { identity: "pystac.Item", package: "pystac", minVersion: "1.12.0", }, "python")model Item {}
@alternateType( { identity: "pystac.Collection", package: "pystac", minVersion: "1.12.0", }, "python")model Collection {}Suppression
Section titled “Suppression”This diagnostic should not be suppressed. Consolidate the dependency to a single version across the referenced packages.