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

Blocklist 2 #579

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Blocklist 2 #579

wants to merge 13 commits into from

Conversation

olegklimov
Copy link
Contributor

No description provided.

@olegklimov
Copy link
Contributor Author

TODO:

  • remove debug prints
  • react on .git appearing / disappearing => reindex all
  • react on indexing.yaml additional_indexing_dirs change => reindex all
  • make sure "git ls" lists unstaged files

Testing:

  • ignored file initial indexing doesn't happen
  • ignored file add / remove file events don't do anything
  • a file in an ignored dir, same tests
  • changes in indexing.yaml loaded (almost) immediately

@olegklimov olegklimov marked this pull request as draft January 31, 2025 10:00
@olegklimov
Copy link
Contributor Author

TODO:

  • make default indexing.yaml entirely commented

Test:

  • Windows paths

) {
let mut candidates: Vec<PathBuf> = vec![path.clone()];
let mut candidates: Vec<PathBuf> = vec![crate::files_correction::canonical_path(&path.to_string_lossy().to_string())];
Copy link
Contributor

Choose a reason for hiding this comment

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

Here I think to_pathbuf_normalize needs to be used because canonical_path does not handle well Windows normalization, we still need to merge this to methods in the future, but for now we should use to_pathbuf_normalize

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm I see canonical_path is also used a lot over the place, perhaps it's time to merge it with to_pathbuf_normalize (like to put logic of to_pathbuf_normalize into canonical_path)

#

blocklist:
- "*/dist/*"
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be the same as the default list compiled in rust?

vcs_folders.push(checkme.clone());
let indexing_yaml_path = checkme.join(".refact").join("indexing.yaml");
if indexing_yaml_path.exists() {
match crate::files_blocklist::load_indexing_yaml(&indexing_yaml_path, Some(&checkme)).await {
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't reload indexing if needed be used here to not load the yaml multiple times while listing files?

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.

3 participants