reference

unresolvable

Wire value: "unresolvable"

Appears on: Documentation Topic, Tutorial (Project), Tutorial Article

1. How swift-docc-render consumes this

unresolvable is one of the ten variants of the RenderReference discriminated union (keyed on a type field) that can appear as a value in a RenderNode's top-level references dictionary. It marks a link whose destination symbol or page could not be resolved at documentation-build time — for example, a symbol from a module that DocC does not have symbol-graph information for (a common case: references into _Concurrency, as seen in the fixture example below).

swift-docc-render does not have a component dedicated to the unresolvable type specifically. Instead, the generic reference-dispatch code in ContentNode.vue's renderNode(), case InlineType.reference looks up the reference object by node.identifier in the references map and forwards whatever fields it finds — url, kind, role, ideTitle, titleStyle — onto a shared Reference.vue component:

case InlineType.reference: {
  const reference = references[node.identifier];
  if (!reference) return null;
  const titleInlineContent = node.overridingTitleInlineContent
    || reference.titleInlineContent;
  const titlePlainText = node.overridingTitle || reference.title;
  return createElement(Reference, {
    props: {
      url: reference.url,
      kind: reference.kind,
      role: reference.role,
      isActive: node.isActive,
      ideTitle: reference.ideTitle,
      titleStyle: reference.titleStyle,
      hasInlineFormatting: !!titleInlineContent,
    },
    class: 'inline-link',
  }, (
    titleInlineContent ? renderChildren(titleInlineContent) : titlePlainText
  ));
}

Because the UnresolvableRenderReference schema (see the data sheet below) only defines type, title, and identifier — it has no url field — the url prop passed into Reference.vue is always undefined for this reference type. Inside Reference.vue, the isInternal computed property short-circuits to false whenever !url, which selects the ReferenceExternal (or, if it were a display-symbol, ReferenceExternalSymbol) branch of refComponent. In ReferenceExternal.vue:

<template>
  <a v-if="url && isActive" :href="url"><slot /></a>
  <span v-else><slot /></span>
</template>

With no url, the v-if is false, so the reference is rendered as a plain <span class="inline-link">{title}</span> — inline text with no href and no click/navigation behavior at all, styled the same as other inline links via the shared .inline-link typography rule. In short: an unresolvable reference degrades gracefully to unlinked plain text carrying only its title.

The filterInactiveReferences helper in src/utils/references.js strips url from references whose type is in the small TopicReferenceTypes set (section, topic) when they come from an archive that isn't in includedArchiveIdentifiers; unresolvable is not in that set and is passed through unchanged — it has no url to begin with, so this filtering is a no-op for it.

In DocCArchive itself, reference-dictionary lookups and the Transformer protocol exist (Sources/DocCArchive/Documentation.docc/DocCArchive/Transformer.md), but the two example conformers — MyHTMLTransformer and MyMarkdownTransformer — are still stub placeholders (a hardcoded HTML comment and an empty string, respectively) and do not yet read the references map or branch on type == "unresolvable"; this kind is decoded into Components.Schemas.UnresolvableRenderReference today but is not yet routed through any real transform.

See also: The references map — how this and every other reference-dictionary lookup works across kinds.

2. Example JSON and rendered mockup

Real example taken from this repository's test fixture Tests/DocCArchiveTests/Fixtures/SampleLibrary.doccarchive/data/documentation/samplelibrary/sampleactor.json (entry doc://SampleLibrary/ScA, a reference to _Concurrency.Actor that DocC could not resolve because the built archive has no symbol graph for the _Concurrency module):

{
  "doc://SampleLibrary/ScA": {
    "identifier": "doc://SampleLibrary/ScA",
    "title": "_Concurrency.Actor",
    "type": "unresolvable"
  }
}

An inline content node elsewhere in the same document points at this reference by identifier, roughly:

{
  "type": "reference",
  "identifier": "doc://SampleLibrary/ScA",
  "isActive": true
}

Rendered mockup — plain text, no link, no hover/focus affordance:

SampleActor conforms to _Concurrency.Actor.

3. Data sheet

Source: Sources/DocCArchive/Vendored/RenderNode.spec.json, schema object UnresolvableRenderReference (one of the oneOf branches of the RenderReference discriminated union, alongside ImageRenderReference, TopicRenderReference, LinkRenderReference, etc.), cross-checked against Sources/DocCArchive/generated/Types.swift, Components.Schemas.UnresolvableRenderReference.

FieldTypeRequiredEnum / defaultNote
typestringyes"unresolvable" (only value)Discriminator; generated as _TypePayload enum with the single case .unresolvable, exposed as _type in Swift (renamed from type via CodingKeys).
titlestringyes—Display text for the unresolved link; this is the only content shown since there is no destination to link to.
identifierstringyes—The reference-scheme identifier (e.g. doc://Module/Symbol) used as the key of this entry in the RenderNode's references map and cross-referenced by inline reference content nodes.

No url, kind, or role field is present in this schema — that absence is exactly what drives the render-side fallback to unlinked plain text described above. Swift-docc's authoring-side model type is UnresolvedRenderReference (Sources/SwiftDocC/Model/Rendering/References/UnresolvedReference.swift:12), which mirrors the same three fields (type defaulted to .unresolvable, identifier, title) and conforms to the RenderReference protocol declared alongside the RenderReferenceType enum in Sources/SwiftDocC/Model/Rendering/References/RenderReference.swift:30, where .unresolvable is one case among image, video, file, fileType, xcodeRequirement, topic, section, download, link, externalLocation, unresolvable.

4. HTML/CSS mapping in DocC-Render output

5. Modern CSS-only alternative

Not applicable

The current behavior is not interactive state at all: Reference.vue's isInternal/refComponent computed properties make a one-time, render-time choice (based purely on whether url is present) between emitting an <a>/<router-link> or a plain <span>. There is no client-side toggle, no user interaction, and no subsequent state change to hold — once the page has rendered, an unresolvable reference is permanently inert markup. This is a static, build-time-determined choice of tag, not a UI state machine, so there is no :checked/:target/<details>/Popover-style mechanism to substitute: those mechanisms exist to hold *changing* interactive state in CSS, and this kind has none to hold. The only "modern CSS" angle worth naming is that the existing conditional tag-selection (anchor vs. span) is inherent to server/build-time rendering choice, not a runtime CSS concern, so no CSS-only replacement applies.