Skip to content

FPL 2.0.0-beta.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@cmoesel cmoesel released this 06 Dec 17:09
· 7 commits to main since this release
2fb67f4

What's Changed

This beta release introduces a total rewrite of the FHIR Package Loader -- with completely new interfaces, implementations, and APIs. As such, this version has significant breaking changes when compared to the previous version of the FHIR Package Loader. These changes were necessary to address limitations in the package loader as well as support future use cases (such as transitive dependencies, multiple versions of the the same package, etc).

The new FHIR Package Loader now utilizes an in-memory database (currently sql.js) to store and query metadata about packages and their resources. This reduces memory usage per-resource since now only the metadata is kept in memory (vs the entire JSON object). With more efficient memory usage, we can now load all resources from the package (instead of just conformance resources) and we will also be able to load transitive packages in the future.

Separate concerns of the package loader have been separated out into their own interfaces and implementations, including:

  • PackageDB interface w/ SQLJSPackageDB implementation. Note that sql.js was chosen due to its support for synchronous queries -- which causes the least disruption to SUSHI (which has many synchronous functions).
  • RegistryClient interface w/ FHIRRegistryClient, NPMRegistryClient, RedundantRegistryClient, and DefaultRegistryClient implementations
  • CurrentBuildClient interface w/ BuildDotFhirDotOrgClient implementation
  • PackageCache interface w/ DiskBasedPackageCache implementation
  • VirtualPackage interface w/ DiskBasedVirtualPackage and InMemoryVirtualPackage implementations
  • PackageLoader interface w/ BasePackageLoader implementation that accepts implementations of the previous interfaces and ties them together for a complete package loading solution.

This release is totally different from the v1 release. As such, any projects that use the existing v1 version of the FHIR Package Loader will need to be updated to use the brand new API introduced in v2.

Full Changelog: v1.0.0...v2.0.0-beta.1