Feature Request: Create an alternative to require function so it doesnt cache. #46

Closed
pasviegas opened this Issue Jan 12, 2010 · 12 comments

8 participants

@pasviegas

Require function always cache, so it makes hot code swap very lousy. Would be interesting to have an alternative to this behavior so changes that you make on the code are deployed instantly.

@pasviegas

What difference it would make? I am thinking about somethin like the require.hot from
felixge:
http://github.com/felixge/node/commit/86b5354a10026c9c86c3a3250f17f4ed45cbdc6c

@pasviegas

Anyway, I think my code wouldnt be reloaded because it would get the function from the cached module, not my new one. But I will try.

@bentomas

pasviegas: you're right, even if you wrap the code in a function it will still be cached. And felixge is indeed working on a require.hot that addresses this very issue. As far as I know his code is still very beta at the moment!

@bentomas

But it is coming...

@pasviegas

Hehe, yeah, thats why I'm posting here, so ( i hope) this feature goes into the master branch.

@kurokikaze

Voting for this too.

@brainfucker

yes "require.hot" will be excellent

@kalloc

very good feature :)

@shimondoodkin

http://github.com/shimondoodkin/node-hot-reload - it is not restart - it is alternative require function. it is more like erlang behavior

@ry
ry commented Dec 14, 2010

liveedit and or process restart. closing.

@shimondoodkin

ry:
is there a live edit like in jit debug, so i can edit the source code and after it it will preserve closure passed variables?

@MarcDiethelm

Can someone specify what the reason for closing this issue was?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment