Closed LorenzoBettini closed 1 year ago
Yes, the index is simply stored in memory is it is very simplistic and does not take long at all to recreate whenever kidex launches.
Reindexing generally doesn't need to be manually triggered as the program continuously watches the directories to keep them indexed, but for manually triggering it the kidex_client
crate inside the repo can be used.
And for the exclusion patterns, globber is used. That syntax for the pattern should be fine though so I don't quite know what is going on with it.
Thank you for the quick answer. Is there any way I can try to understand why it doesn't work? I mean, can I enable some logging? Just to be sure: the exclusion patterns are for files and directories, aren't they?
The exclusions are for all paths, you should be able to plop in some log statements in the code in Index::create_index
, where the patterns are checked.
I didn't mean to debug: I mean if kidex logs something somewhere.
What do you mean by "plop"?
@Kirottu I had a look at https://github.com/Kirottu/kidex/blob/master/kidex/src/index.rs#L62
I know nothing about Rust, but I have the impression that the ignore pattern is used only for events.
In fact, if I run kidex
and a create a .class
file or rename an existing one, the new (or renamed) files are not shown, while the previously existing ones are still shown.
If I stop kidex
and start it again, all the .class
files are shown (again, new ones or renamed are not shown).
I guess that's not intentional ;)
Ah, that must be the issue then. I'll get it fixed soon enough.
By the way, in index_dir you don't use as_os_str while in create_index you do
Should be fixed now on the master branch, do test it out.
@Kirottu I've just tried AUR kidex-git and the problem is still there... I'm assuming that AUR package is based on this Git repository, or not?
I have also cloned this repository and compiled it from source: the behavior is exactly the same as before (new and renamed files are excluded, but the existing ones when kidex starts are not excluded), so I'm afraid this but is still there... I would suggest the use of some automated tests. Please let me know if I can help further.
Automated tests would probably be useful yeah. But implementing them could be kinda difficult.
Ok now it should actually work.
@Kirottu thanks! Looks like it's working fine now :)
Automated tests are an investment and they are what allows a program to be easily maintained ;)
I really should look into that at some point, thanks for the help!
Hi, thank you for the program (including anyrun).
I'm evaluating kidex (through the AUR package "kidex") but I think some more documentation might help:
ignored: ["*.class"],
but the files ending with.class
are still shown by anyrunThank you in advance!