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

defmethod watch! :beholder + wait-and-rescan! currently broken #440

Closed
ivarref opened this issue Aug 12, 2024 · 1 comment · Fixed by #441
Closed

defmethod watch! :beholder + wait-and-rescan! currently broken #440

ivarref opened this issue Aug 12, 2024 · 1 comment · Fixed by #441

Comments

@ivarref
Copy link

ivarref commented Aug 12, 2024

Hi, and thanks for a great and useful project!

I noticed that adding :kaocha.watch/ignore ["*.tmp"] in tests.edn did not work as intended. As far as I can see there are two reasons for that:

*.tmp will only match files in the current directory.

beholder returns fully qualified names (on both mac and linux).

thus:

(glob? (.toPath (java.io.File. "/foo/bar/demo.tmp")) ["*.tmp"])
=> nil

I suggest to update the documentation to give **.tmp as an example. That will match /foo/bar/demo.tmp as well.

The second reason is that beholder will return java.nio.file.Path and not java.io.Filewhich wait-and-rescan! expects. This will lead to a NullPointerException.

I have written a pull request that fixes this.

Thanks again for a great project!
Kind regards
Ivar

@plexus
Copy link
Member

plexus commented Aug 12, 2024

Thanks! This might be because we switched at some point from another watcher lib to beholder. Glad it's fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants