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

storage: refactor with trait objects to allow composition #137

Closed
wants to merge 2 commits into from
Closed

storage: refactor with trait objects to allow composition #137

wants to merge 2 commits into from

Conversation

huachaohuang
Copy link
Contributor

@huachaohuang huachaohuang commented Nov 28, 2021

Upper-level modules like Kernel/Engine need to create a storage dynamically without knowing the specific type. Check this for an example.

Other updates in this PR:

I am currently focusing on prototyping the [kernel[(https://github.com//pull/136). So I opt out of some implementations to avoid fixing all of them now.

Upper-level modules like Kernel/Engine need to create a storage dynamically without knowing the specific type.

Also update toolchain to address [this issue](rust-lang/rust-analyzer#10772).
tisonkun
tisonkun previously approved these changes Nov 28, 2021
Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're re-design the abstraction, it's totally OK to remove the outdated implementations and bring them back while the abstraction becomes solid again. One of the advantages of using VCS is to develop rapidly and clearly while keeping all the version history.

There is always an overhead to review the following PR to bring back/update other implementations (as #99). If we're in a situation to prototyping with mem impl rapidly, we can just frankly reflect it with the main branch :)

For the diff, it looks good to me that we use a Box<dyn Trait> for prototyping and later optimizing with enum dispatch or something.

Please fix the unnecessary deps warning or simply disable/remove it for now.

@tisonkun
Copy link
Contributor

Otherwise, you can prototype the kernel concept in your fork, and bring changes only if it seems a good direction. You should lose nothing but like developing on the main branch.

@huachaohuang
Copy link
Contributor Author

@tisonkun Yeah, maybe just keep these PRs open in case someone interested in what we are doing.

@tisonkun
Copy link
Contributor

@huachaohuang Make sense. You can convert it into a draft or set a highlight note on the description. I'm also digging a better abstraction.

@huachaohuang huachaohuang marked this pull request as draft November 29, 2021 02:30
@huachaohuang
Copy link
Contributor Author

Close in favor of #154 .

@huachaohuang huachaohuang deleted the storage branch December 2, 2021 04:03
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.

None yet

2 participants