Repository navigation
Replace ProviderFactory and WorkspaceSession with IVersionControl, add History - #4
Merged
Merged
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.
All providers implement now one interface:
IVersionControl. It replacesProviderFactory,WorkspaceSessionand the optional services. This breaks every consumer of 0.5.0.What changes for a consumer
GitProvider.createandLakeFsProvider.createtake one options record and return the provider. The earlier creation functions are gone.Open,Clone,InitializeandBindreturn an openedRepository. Every other function takes it as its first argument, andClosereleases it. A provider refuses a repository that another provider opened.Opentakes the folder and nothing else. The library stores no binding, and it no longer looks up which provider owns a folder. A host asksProbeof its providers.CallResult<'T>. It isExecutedwith theOperationResult, orNoOpwith a reason when the provider does not have the function. The stand-in services and the codeservice_unavailableare gone.ProviderFunctionslist in which each entry isImplementedorMissing, wrapped byListedProvider.Subscribe.singleandSubscribe.allgive a consumer the functions with their own signatures.IHistoryhasListRevisions(newest first, in pages) andGetRevisionChanges. Git implements both.DiffComparison.Revisioncompares a file in a commit with its first parent.RepositoryDescriptor,RepositoryStatus,RepositoryRoot), andOperationEffect.NoOpisUnchanged.Performedwith the downloaded paths.The library is built and tested with Fable 5.26.0. The README and the two guides (
docs/consuming.md,docs/provider-authoring.md) describe the interface, anddocs/workspace-bindings.mdis removed with the bindings.Two cases that are new:
invalid_cursor.The F# samples of the guides were compiled against the library.
Known issues
Open.docs/consuming.mdsays so. Reporting the folder as given would be a second behavior change inOpen, so it is not part of this PR.ProbeResult.Detectedstill carries abindingHintthat no provider fills. Removing it changes the result ofProbe, which this PR leaves as it is.