Quick background thread reloader and scaffolding #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I wrote a quick function to fire off a background thread when your app starts so that it would automatically reload your namespaces without any extra fuss - a call to
(start-nstracker ["src" "test" "checkouts"])
and you're done.The other part is a bit more interesting - I've built a
(scaffold!)
macro that you can wrap around most any piece of code - then when that code executes, it will remember it and keep running it with its local state on every reload. I'm finding it immensely useful for GUI development - I can wrap it around panel generation and code almost live after getting to a certain state in the app with it automatically reconstructing the tweaked UI with it's local state.It's not perfect, but I figured maybe it's useful to others, so I decided to contribute it to this project since it makes sense in here :)