https://github.com/rj/erlang-reup
Watches for .erl & .hrl changes, recompiles and reloads. You know, for development.
https://github.com/rj/erlang-reup
Last synced: 16 days ago
JSON representation
Watches for .erl & .hrl changes, recompiles and reloads. You know, for development.
- Host: GitHub
- URL: https://github.com/rj/erlang-reup
- Owner: RJ
- Created: 2015-05-05T14:58:52.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2019-11-27T15:34:22.000Z (over 5 years ago)
- Last Synced: 2025-05-02T08:51:12.726Z (19 days ago)
- Language: Erlang
- Homepage:
- Size: 8.79 KB
- Stars: 24
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## the erlang re-up
**Watches** your erlang source/header files for changes, **recompiles** the
changed modules using the same compiler options as the last compile, and
**reloads** them.Conceptually similar to [sync](https://github.com/rustyio/sync) and [active](https://github.com/synrc/active), but works happily on NFS or vbox shared folders. Stateless, because we watch the filesystem by
polling with find, so can handle enormous erlang projects just fine.Because it reuses the compile options from last time (provided you
compile with `debug_info`), it will Just Work, regardless of what you use to build your project (rebar2, rebar3, make, etc).### Building
Add this application as a dev-only dependency to your project. If you're
using rebar3, which I recommend, this should be easy.Something, something..
application:start(reup).
### Options
If you want reup to compile but not load the modules, set application env:
`{reload_on_compile, false}`
### Implementation Notes
Has to work on virtualbox with crappy shared folders, so doesn't use
inotify or fswatcher stuff. Known to work on Ubuntu Linux & OS X.The script in `priv/` polls for src changes using some shell gubbins,
and emits changed filenames.If a `*.hrl` file changes, it naively emits the filenames of `*.erl`
files that match a grep for the header filename, which tends to work.