Implement file-backed repositories via .store files#623
Open
Implement file-backed repositories via .store files#623
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #178 — file-backed repositories via
.storefiles..storefiles are YAML files that automatically seed repositories at startupchmod o+wenables write-backaro buildrejects writable stores (can't write back into a binary)Changes
Sources/ARORuntime/Store/StoreFileLoader.swift— Discovers and parses.storefilesSources/ARORuntime/Store/StoreFlushService.swift— Actor-based write-back with debounceSources/ARORuntime/Application/Application.swift— Seeds repositories before Application-Start, flush on shutdownSources/ARORuntime/FileSystem/FormatDeserializer.swift— Fix YAML array parser for multi-line objectsSources/AROCLI/Commands/RunCommand.swift— Verbose logging for store filesSources/AROCLI/Commands/BuildCommand.swift— Reject writable stores at build timeExamples/StoreFileDemo/— Example with read-only product catalogTests/AROuntimeTests/StoreFileTests.swift— 19 tests (loader, flush, integration)Proposals/ARO-0073-store-files.md— Formal proposalBook/TheLanguageGuide/Chapter36-Repositories.md— Store files section addedTest plan
swift buildpassesswift test --filter StoreFile— 19/19 tests passswift test --filter RepositoryStorage— no regression (19/19 pass)swift test --filter FormatSerializer— no regression (23/23 pass)swift run aro run ./Examples/StoreFileDemo— output matches expected.txtperl t/run_tests.pl)Closes #178