FHIR package loading falls back to public registries and fails silently (vscode-cql#106)

Open
#158 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
java, kotlin

Research direction

Start with IgContextManager and the FHIR package loading path, then read the linked vscode-cql#106 reproduction details and HAPI 6.9.12 behavior. The proposed work spans client error reporting, registry fallback rules, authenticated proxy downloads, and ADR-0001 in docs/adr/. Done means package-load failures reach the client, configured mirror-only behavior is respected, proxy credentials work for downloads, and the ADR documents the approach.

Written by the indexing model from the issue text.

Description

bug

Supports cqframework/vscode-cql#106.

When the language server loads an IG's FHIR package dependencies, HAPI (org.hl7.fhir.utilities
6.9.12 in LS 5.0.0) falls back to build.fhir.org and the package's canonical site whenever no
server configured in ~/.fhir/fhir-settings.json can supply a package. It does this even with
ignoreDefaultPackageServers: true. If that fails too, IgContextManager logs one WARN and
skips the dependencies, so validation reports success with no diagnostics and the user never
sees the failure.

Reproduced against 5.0.0. The details are in
https://github.com/cqframework/vscode-cql/issues/106#issuecomment-6768501546. Two common
triggers:

  • the registry doesn't host a package the LS needs. The LS loads hl7.fhir.r4.core first, so a
    registry with only private packages fails straight away.
  • the registry's dist.tarball URL is outside the configured server url path, so HAPI doesn't
    send the token and the download gets a 401.

Proposed work. An ADR describing the approach will come with the PR for this issue.

  • Report package-load failures to the client, for example as a diagnostic or notification,
    instead of only logging a WARN.
  • Mirror-only behaviour when ignoreDefaultPackageServers is set, either with an LS-side
    guard or an upstream HAPI change.
  • Install a proxy java.net.Authenticator that uses http.proxyUser/http.proxyPassword,
    so authenticated proxies work for package downloads.
  • Add docs/adr/ with ADR-0001, "Runtime network access (FHIR packages, proxies, TLS)".
Dominant language
Kotlin
Stars
2
Forks
4
Avg merge
1d 16h
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cqframework/cql-language-server

All issues in cqframework/cql-language-server

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.