Humanizr/Humanizer · error · InvalidOperationException
Release duration-case completeness requires zero unsupported
Error message
Release duration-case completeness requires zero unsupported dispositions; found {unsupportedPaths.Length}: {string.Join(", ", unsupportedPaths)}. What it means
Thrown by DurationCaseCoverageInput.Create when GetUnsupportedPaths returns any paths across all release locale catalogs. Release completeness requires that no duration-case disposition is left as 'unsupported' — every classification, case realization, and unit must be fully resolved. The message lists the count and the specific paths.
Source
Thrown at src/Humanizer.SourceGenerators/Common/DurationCaseModels.cs:183
.ToArray();
if (legacyCatalogs.Length > 0)
{
throw new InvalidOperationException(
$"Release duration-case locales must use the explicit inventory, reason, sources, and provenance contract: {string.Join(", ", legacyCatalogs)}.");
}
var unsupportedPathBuilder = ImmutableArray.CreateBuilder<string>();
foreach (var catalog in immutableCatalogs)
{
unsupportedPathBuilder.AddRange(GetUnsupportedPaths(catalog));
}
var unsupportedPaths = unsupportedPathBuilder
.OrderBy(static path => path, StringComparer.Ordinal)
.ToArray();
if (unsupportedPaths.Length > 0)
{
throw new InvalidOperationException(
$"Release duration-case completeness requires zero unsupported dispositions; found {unsupportedPaths.Length}: {string.Join(", ", unsupportedPaths)}.");
}
return new DurationCaseCoverageInput(immutableCatalogs, rows.MoveToImmutable());
}
internal static void ValidateReleaseCompleteness(DurationCaseCatalog catalog)
{
var path = $"{catalog.LocaleCode}.durationCases";
if (catalog.Sources.IsEmpty)
{
throw new InvalidOperationException(
$"'{path}' must use the explicit inventory, reason, sources, and provenance contract in a release locale.");
}
var unsupportedPaths = GetUnsupportedPaths(catalog);
if (unsupportedPaths.Length > 0)
{View on GitHub (pinned to ffc2b77c0f)
Solutions
- Change the locale's durationCases classification from 'unsupported' to a concrete value: 'distinct', 'invariant', or 'not-applicable'.
- If individual case realizations or units are unsupported, provide complete data for them or reclassify the whole locale.
- For locales where duration cases truly don't apply, use 'not-applicable' with a reason — not 'unsupported'.
Example fix
# before
durationCases:
classification: unsupported
# after
durationCases:
classification: not-applicable
reason: "Language has no grammatical case system."
sources: [...]
provenance: { ... } Defensive patterns
Strategy: validation
Validate before calling
// Pre-check for unsupported dispositions across all catalogs
static List<string> PreviewUnsupportedPaths(ImmutableArray<DurationCaseCatalog> catalogs)
{
var paths = new List<string>();
foreach (var catalog in catalogs)
{
if (catalog.Classification == DurationCaseClassification.Unsupported)
paths.Add($"{catalog.LocaleCode}.durationCases.classification");
}
return paths;
} Prevention
- No release locale may use 'classification: unsupported'.
- Replace 'unsupported' with 'not-applicable' (with reason) for languages without case systems.
- Audit all locale files for 'unsupported' dispositions before tagging a release.
When it happens
Trigger: Create iterates all catalogs, collects unsupported paths (classification == Unsupported, or any realization/unit with Kind == Unsupported), and throws if the count is non-zero. For example, a locale with classification: unsupported in a release build triggers '{locale}.durationCases.classification' as an unsupported path.
Common situations: A locale is marked 'unsupported' as a placeholder during development but ships in a release. Or a case realization or individual unit is flagged unsupported because the locale data is incomplete. Release builds enforce zero unsupported dispositions.
Related errors
- Locale '{locale.LocaleCode}' must classify the durationCases
- Locale '{locale.LocaleCode}' has no authored or same-languag
- Release duration-case locales must use the explicit inventor
- '{path}' must use the explicit inventory, reason, sources, a
- '{path}' must define exactly one of phrase, sameRenderedAs,
AI-assisted analysis of Humanizr/Humanizer@ffc2b77c0f (2026-08-13).
Data as JSON: /api/errors/6b3f2397c73e4fac.
Report an issue: GitHub.