Skip to content
This repository was archived by the owner on Aug 20, 2020. It is now read-only.

Implement Root based filtering for files and folders in Vfs #4

Merged
merged 6 commits into from
Mar 18, 2019

Conversation

vipentti
Copy link
Contributor

The filtering is done through implementing the trait Filter which is then applied to folders and files under the given RootEntry.

This relates to discussion in rust-lang/rust-analyzer#869 and in zulip . This allows users to provide filtering for each root. Enabling to have crate specific filtering applied, so for example for external crates you may exclude test|bench|example folders.

The filtering is done through implementing the trait `Filter` which is then
applied to folders and files under the given `RootEntry`.
Copy link
Member

@matklad matklad left a comment

Choose a reason for hiding this comment

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

LGTM modulo some nits.

Could you send a PR to rust-analyzer as well, to check that ra test suite passes as well? You can use [patch] section from root Cargo.toml to override ra_vfs to your git repository

@vipentti
Copy link
Contributor Author

Will check rust-analyzer next

@vipentti
Copy link
Contributor Author

rust-analyzer test PR in rust-lang/rust-analyzer#994

@matklad
Copy link
Member

matklad commented Mar 18, 2019

Awesome, thanks!

bors r+

bors bot added a commit that referenced this pull request Mar 18, 2019
4:  Implement Root based filtering for files and folders in Vfs r=matklad a=vipentti

The filtering is done through implementing the trait `Filter` which is then applied to folders and files under the given `RootEntry`.

This relates to discussion in rust-lang/rust-analyzer#869 and in [zulip](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/ignoring.20in.20VFS) . This allows users to provide filtering for each root. Enabling to have crate specific filtering applied, so for example for external crates you may exclude `test|bench|example` folders.


Co-authored-by: Ville Penttinen <[email protected]>
@matklad
Copy link
Member

matklad commented Mar 18, 2019

I'll do a release once this is merged.

@bors
Copy link
Contributor

bors bot commented Mar 18, 2019

Build succeeded

  • rust-analyzer.ra_vfs

@bors bors bot merged commit d7e2fa6 into rust-analyzer:master Mar 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants