Skip to content

Introduce IPackageReader and origin-based package IO#703

Merged
chrisgregan merged 1 commit into
mainfrom
project-reads
May 29, 2026
Merged

Introduce IPackageReader and origin-based package IO#703
chrisgregan merged 1 commit into
mainfrom
project-reads

Conversation

@chrisgregan
Copy link
Copy Markdown
Contributor

Add PackageOrigin and PackageInfo.Origin to track whether a package is Bundled or Project. Introduce IPackageReader with DirectPackageReader and FileStoragePackageReader implementations so package bytes can be read either directly from disk (bundled) or via IFileStorage/IResourceRegistry (project). Update PackageLocalizationService, PackageManifestLoader, and PackageRegistry to select the appropriate reader based on package origin and to handle read errors consistently; make FileStorage reads synchronous via Task.Run to avoid deadlocks. Adjust tests and call sites to pass PackageInfo and workspace wrappers where needed and add resource key stubs in tests.

Add PackageOrigin and PackageInfo.Origin to track whether a package is Bundled or Project. Introduce IPackageReader with DirectPackageReader and FileStoragePackageReader implementations so package bytes can be read either directly from disk (bundled) or via IFileStorage/IResourceRegistry (project). Update PackageLocalizationService, PackageManifestLoader, and PackageRegistry to select the appropriate reader based on package origin and to handle read errors consistently; make FileStorage reads synchronous via Task.Run to avoid deadlocks. Adjust tests and call sites to pass PackageInfo and workspace wrappers where needed and add resource key stubs in tests.
@chrisgregan chrisgregan merged commit c114fae into main May 29, 2026
6 checks passed
@chrisgregan chrisgregan deleted the project-reads branch May 29, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant