You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement functionality to get notifications of file changes and update NBT data (and probably if possible, YML if NBT changes). It should be easily enabled via CLI and opt-in. Flags could --watch with alias -w.
This commit introduces mainly the option to start a watch server for
following changes in YML file and then recompiling the NBT file. This
works by using a unix syscalls `inotify(7)`. But it also includes other
changes which are more touched upon in the next sections.
Module `err` contains a wrapper enum `MyError` which simply wraps around
various errors that occur at runtime. For now, when errors appear, they
are just sent to main function where they are handled via `.expect`. But
this may change in the future as errors should be printed in more user
friendly text.
Module `state` is used for storing everything concerning State machine.
It contains a simple `State` struct that stores opened NBT and YML
files with helper functions to reset cursor position before generating
buffered reader/writer. For now the `STATE` is stored in stack of `MAIN`
function, but storing in `GLOBAL` state should be revisited.
Module `util` contains all of the helper functions that use to exist in
crate root. Only helper functions are contained there to abstract
implementation details from `fn main`.
Changes are mostly in experimental stage and conversion may improve
between NBT and YML formats.
Initial stage for #5
Implement functionality to get notifications of file changes and update NBT data (and probably if possible, YML if NBT changes). It should be easily enabled via CLI and opt-in. Flags could
--watch
with alias-w
.For now possible solution for this is to use inotify (7) syscall via nix crate.
The text was updated successfully, but these errors were encountered: