Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine FsRepository and OpenFsRepository #1156

Open
wants to merge 1 commit into
base: refactor-renderer-for-win
Choose a base branch
from

Conversation

jrray
Copy link
Collaborator

@jrray jrray commented Nov 28, 2024

Use the type state pattern to combine these two types into a single type. This is some groundwork for creating new types to represent repos that have renders or not.

FsRepository used to represent a repo that may not be opened yet, this is now represented by the type alias:

type MaybeOpenFsRepository = FsRepository<MaybeOpenFsRepositoryImpl>

An already opened repository has the same name, but is now a type alias:

type OpenFsRepository = FsRepository<OpenFsRepositoryImpl>

The original types have been renamed to these *Impl names:

FsRepository -> MaybeOpenFsRepositoryImpl
OpenFsRepository -> OpenFsRepositoryImpl

@jrray jrray added the pr-chain This PR doesn't target the main branch, don't merge! label Nov 28, 2024
@jrray jrray self-assigned this Nov 28, 2024
@jrray jrray force-pushed the open-repo-type-state branch 2 times, most recently from 4e29bbf to 086c6b9 Compare December 4, 2024 18:34
@jrray jrray changed the base branch from repo-ext-traits to refactor-renderer-for-win December 4, 2024 18:35
Use the type state pattern to combine these two types into a single
type. This is some groundwork for creating new types to represent repos
that have renders or not. This code doesn't make much use of the type
state pattern yet.

`FsRepository` used to represent a repo that may not be opened yet, this
is now represented by the type alias:

    type MaybeOpenFsRepository = FsRepository<MaybeOpenFsRepositoryImpl>

An already opened repository has the same name, but is now a type alias:

    type OpenFsRepository = FsRepository<OpenFsRepositoryImpl>

The original types have been renamed to these *Impl names:

    FsRepository -> MaybeOpenFsRepositoryImpl
    OpenFsRepository -> OpenFsRepositoryImpl

Signed-off-by: J Robert Ray <[email protected]>
@jrray jrray force-pushed the open-repo-type-state branch from 086c6b9 to d08ddba Compare December 10, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-chain This PR doesn't target the main branch, don't merge!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant