-
Notifications
You must be signed in to change notification settings - Fork 150
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
Add straight-watcher.el #694
Conversation
2725abb
to
f178ecc
Compare
In consideration of #390, #447, #488, #508, #519, and #712: I think it would be best to move away from using file mtimes to determine modifications. The question is, what do we hash? We could have the watcher process expand the package's Pros:
Cons:
Thoughts? |
Yeah! I think that makes a lot of sense. In fact, if we implement this, we might be able to get rid of the I think hashing the Here's a fun trick I've used in the past to have an external process write hashes like this in a format that's super fast to read: when package Thanks for taking the lead on this improvement! |
a8c8f3e
to
5271f06
Compare
This functionality (and arguably many of the other components of straight.el) would be easier to reason about if it were in its own file/sub-feature. However, loading that file is complicated by the bootstrap/installation process. Haven't found a clean way to do this yet. |
I'll certainly agree with you that I think I see what you mean about the bootstrap process. Here's one useful note, though: anything that isn't actually needed during initial bootstrap can be in a separate file no problem, since the single-file download used during bootstrap is only used to install You just need to make sure that any of these separate files used after init/bootstrap are loaded only when needed, and not eagerly. (Which is good for performance anyway.) Since a filesystem watcher doesn't need to be launched during initial installation, it's fine to put this code in a separate file, as long as we |
76bb22c
to
0155f83
Compare
Reimplementation of the watcher script in elisp. Add straight--hash-repo-files Use a hash of repo's files (according to its recipe's :files directive) to track the content of a repo. This should allow us to tell when the files we care about have actually changed content for rebuilds.
With the current bootstrapper, we don't have the full repository available during bootstrap. I think the appropriate solution is to just have the user start the watcher from their init file if/when they desire.
I won't be working on this feature any time soon, but anyone who is interested is welcome to any of the code in this patch. One potential problem with this approach is the large number of open file descriptors when simulating recursive directory watching. There was a proposed patch to Emacs's library to allow recursive directory watching, but it stalled. |
Reimplementation of the watcher script in elisp.
See: #692
Not quite complete, but I figured I'd share it to show the general direction so far.