Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

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

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

Comments

@pasviegas
Copy link

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
Copy link
Author

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

@pasviegas
Copy link
Author

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
Copy link

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
Copy link

But it is coming...

@pasviegas
Copy link
Author

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

@kurokikaze
Copy link

Voting for this too.

@brainpicture
Copy link

yes "require.hot" will be excellent

@kalloc
Copy link

kalloc commented Feb 3, 2010

very good feature :)

@shimondoodkin
Copy link

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

@ry
Copy link

ry commented Dec 14, 2010

liveedit and or process restart. closing.

@shimondoodkin
Copy link

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
Copy link

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

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants