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

Decouple our fs module from details of the Worktree #110

Merged
merged 4 commits into from
Jul 14, 2021
Merged

Conversation

maxbrunsfeld
Copy link
Collaborator

This is a small refactor that makes the Fs trait more of a direct shim for the standard fs APIs, instead of containing some of our implementation logic for the worktree (dealing with CharBag for fuzzy matching, and id for rename detection).

@as-cii
Copy link
Member

as-cii commented Jul 14, 2021

Nice! ✨ In e1c0d90 I made a tiny improvement to use Entry::new instead of constructing it manually.

Going ahead and merging this so that we can close #92.

@as-cii as-cii merged commit 4313e99 into main Jul 14, 2021
@as-cii as-cii deleted the fs-refactor branch July 14, 2021 07:36
Anthony-Eid added a commit to Anthony-Eid/zed that referenced this pull request Feb 7, 2025
* WIP

Co-Authored-By: Piotr Osiewicz <[email protected]>
Co-Authored-By: Anthony Eid <[email protected]>

* Tear stuff out and make the world burn

Co-authored-by: Remco Smits <[email protected]>
Co-authored-by: Piotr <[email protected]>

* Fix compile errors

* Remove dap_store from module list and fix some warnings

Module list now uses Entity<DebugSession> to get active modules and handle remote/local state
so dap_store is no longer needed

* Add Cacheable Command trait

This gets rid of ClientRequest or whatever the name was; we don't need to enumerate every possible request and repeat ourselves, instead letting you mark any request as cached with no extra boilerplate.

* Add Eq requirement for RequestSlot

* Implement DapCommand for Arc<DapCommand>

That way we can use a single allocated block for each dap command to store it as both the cache key and the command itself.

* Clone Arc on demand

* Add request helper

* Start work on setting up a new dap_command_handler

* Make clippy pass

* Add loaded sources dap command

* Set up module list test to see if Modules request is called

* Fix compile warnings

* Add basic local module_list test

* Add module list event testing to test_module_list

* Bring back as_any_arc

* Only reset module list's list state when modules_len changes

---------

Co-authored-by: Piotr Osiewicz <[email protected]>
Co-authored-by: Anthony Eid <[email protected]>
Co-authored-by: Anthony Eid <[email protected]>
Co-authored-by: Piotr <[email protected]>
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.

2 participants