# Remove dependencies from the Worktree crate and make it more focused \(\#12747\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/48581167b73165fe9f9c780a73a6be7c1602f7a9)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 48581167b73165fe9f9c780a73a6be7c1602f7a9

Requested commit: 48581167b73165fe9f9c780a73a6be7c1602f7a9

Commit: 48581167b73165fe9f9c780a73a6be7c1602f7a9

Tree: 013f22136f1b2e0328ac0f25b7cc18734d0648bd

Author: Max Brunsfeld

Committer: GitHub

## Message

```
Remove dependencies from the Worktree crate and make it more focused (#12747)

The `worktree` crate mainly provides an in-memory model of a directory
and its git repositories. But because it was originally extracted from
the Project crate, it also contained lingering bits of code that were
outside of that area:
* it had a little bit of logic related to buffers (though most buffer
management lives in `project`)
* it had a *little* bit of logic for storing diagnostics (though the
vast majority of LSP and diagnostic logic lives in `project`)
* it had a little bit of logic for sending RPC message (though the
*receiving* logic for those RPC messages lived in `project`)

In this PR, I've moved those concerns entirely to the project crate
(where they were already dealt with for the most part), so that the
worktree crate can be more focused on its main job, and have fewer
dependencies.

Worktree no longer depends on `client` or `lsp`. It still depends on
`language`, but only because of `impl language::File for
worktree::File`.

Release Notes:

- N/A
```

## Parents

- [00dfd217d8fdd7392ef88fef3fa17aa0de768236](https://git.cafe/gitcafe/zed/commit/00dfd217d8fdd7392ef88fef3fa17aa0de768236?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/48581167b73165fe9f9c780a73a6be7c1602f7a9?format=markdown)
