Skip to content

Build on rdflangserver

Excluded alternative universe

This is the excluded alternative universe from the parent ADR.

This path is unavailable as a PyPI dependency today, but it records what would change if rdflangserver became publishable. It would use rdflangserver as the Python LSP foundation and generalize its RDF language support for JSON-LD, YAML-LD, and Markdown-LD.

niklasl/rdflangserver declares repository version 0.1.0-dev pyproject.toml; the corresponding rdflangserver PyPI package is unavailable.

Implementation checklist

  • Publish and release a stable rdflangserver package with a versioned compatibility policy before making it a dependency.
  • Audit the PyGLS and RDFLib boundaries for LSP lifecycle, document storage, URI handling, position conversion, diagnostics, and workspace synchronization.
  • Add JSON-LD, YAML-LD, and Markdown-LD syntax layers that retain mappings from semantic-value paths to authored key and scalar spans.
  • Connect a JSON-LD processor to the mapped semantic representation without losing the source locations needed for diagnostics and navigation.
  • Define context loading and local-IRI policy, including relative resolution, permitted local files, document bases, and remote-context handling.
  • Recognize @type: @id coercion, expose IRI-valued scalars as clickable links, and return every matching workspace definition.
  • Make unsaved buffers authoritative for parsing, context resolution, diagnostics, document links, and the definition index.
  • Maintain an incremental workspace index of IRI definitions and references across JSON-LD, YAML-LD, and Markdown-LD.
  • Add processor, source-map, and end-to-end LSP tests for source ranges, context failures, IRI links, relative cross-file navigation, multiple definitions, and unsaved edits.
  • Publish the generic server and document editor integrations and file associations for JSON-LD, YAML-LD, and Markdown-LD.

Universe consequences

  • Adoption cannot begin until a supported package is released; the project must either sponsor that release or carry a forked distribution.
  • The implementation, dependency management, and editor integration follow the Python and PyGLS ecosystems.
  • YAML-LD and Markdown-LD require a maintained semantic-value-to-source-span bridge because JSON-LD processors do not preserve their authored syntax locations.
  • The project must track upstream changes in rdflangserver, PyGLS, RDFLib, and the selected JSON-LD processor behind a stable LSP-facing model.