Skip to content

Add nextjournal/beholder as an alternative watcher#268

Merged
alysbrooks merged 7 commits into
mainfrom
ox/add-optional-watcher-beholder
Feb 1, 2022
Merged

Add nextjournal/beholder as an alternative watcher#268
alysbrooks merged 7 commits into
mainfrom
ox/add-optional-watcher-beholder

Conversation

@oxalorg

@oxalorg oxalorg commented Jan 26, 2022

Copy link
Copy Markdown
Member

hawk is using an old version of JNA which breaks file watching on m1 macs.
The alternative was to use :polling or :java but they were either too slow
or consumed lots of battery

beholder seems to be maintained, fast, and a much cleaner approach.

figwheel has also shifted to using beholder instead of hawk. shadow-cljs
also got rid of hawk

maybe beholder should just replace hawk altogether?

  • add beholder as default FS
  • hawk can be used using a configuration param :kaocha.watch/type :hawk but show DEPRECATED warnings
  • update docs and changelog

cc: #151 , thheller/shadow-cljs@f3b89b5 , bhauman/figwheel-main#299

hawk is using an old version of JNA which breaks file watching on m1 macs.
The alternative was to use :polling or :java but they were either too slow
or consumed lots of battery

beholder seems to be maintained, fast, and a much cleaner approach.

figwheel has also shifted to using beholder instead of hawk. shadow-cljs
also got rid of hawk

maybe beholder should just replace hawk altogether?
@codecov

codecov Bot commented Jan 26, 2022

Copy link
Copy Markdown

Codecov Report

Merging #268 (9ecc0ec) into main (005e91f) will decrease coverage by 0.27%.
The diff coverage is 74.07%.

❗ Current head 9ecc0ec differs from pull request most recent head de158bd. Consider uploading reports for the commit de158bd to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #268      +/-   ##
==========================================
- Coverage   75.62%   75.35%   -0.28%     
==========================================
  Files          51       51              
  Lines        2659     2678      +19     
  Branches      246      250       +4     
==========================================
+ Hits         2011     2018       +7     
- Misses        495      503       +8     
- Partials      153      157       +4     
Flag Coverage Δ
integration 57.28% <11.11%> (-0.34%) ⬇️
unit 69.11% <74.07%> (-0.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/kaocha/watch.clj 78.67% <74.07%> (-3.10%) ⬇️
src/kaocha/core_ext.clj 64.28% <0.00%> (-4.77%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 005e91f...de158bd. Read the comment docs.

@plexus

plexus commented Jan 27, 2022 via email

Copy link
Copy Markdown
Member

@alysbrooks

Copy link
Copy Markdown
Member

I guess the only thing we'd lose is the ability to fall back to polling, but hopefully no one is relying on that.

@alysbrooks

Copy link
Copy Markdown
Member

I realize this is a draft, but I was already looking at Beholder's source and noticed something. Does Beholder have any options? Maybe we can delete that configuration option?

we can remove hawk completely in a few versions, until then folks
can manually configure `:kaocha.watch/type :hawk` to use hawk

deprecation notice is warned when either hawk is configured
or if hawk-opts are found in the config
@oxalorg oxalorg marked this pull request as ready for review January 31, 2022 12:09
Right now beholder has no configuration options

@alysbrooks alysbrooks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good! I have some small changes you can take or leave but nothing too major.

Comment thread src/kaocha/watch.clj
Comment thread src/kaocha/watch.clj
Comment thread doc/07_watch_mode.md
Comment thread doc/07_watch_mode.md Outdated
Comment thread doc/07_watch_mode.md Outdated
oxalorg and others added 2 commits February 1, 2022 00:22
Co-authored-by: A Brooks <alys@gaiwan.co>
Co-authored-by: A Brooks <alys@gaiwan.co>
@oxalorg

oxalorg commented Jan 31, 2022

Copy link
Copy Markdown
Member Author

@alysbrooks Thanks for the suggestions, made those changes. Feel free to merge it in :)

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