Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upHot-swapper does not check types of new states vs. old states #81
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jvoigtlaender
May 18, 2015
Contributor
Maybe it makes sense to add this to https://github.com/elm-lang/elm-reactor/milestones/Swapping?
|
Maybe it makes sense to add this to https://github.com/elm-lang/elm-reactor/milestones/Swapping? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Yeah, can we move this issue over to that repo? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Sure, will do. |
jvoigtlaender
closed this
May 18, 2015
jvoigtlaender
referenced this issue
Jun 23, 2015
Closed
Hot-swapper does not check types of new states vs. old states #107
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jvoigtlaender
Jul 16, 2015
Contributor
Reopening this issue here, since it was closed over at elm-lang/elm-reactor#107, because the reactor does not at the moment actually do any hot-swapping (it just swaps and replays).
On the other hand, http://elm-lang.org/try does use hot-swapping, and is affected by the difference of actual implementation from what the "Interactive Programming" post says.
The current code showing that only the structure, not the types, are compared on hot-swap is here: https://github.com/elm-lang/core/blob/2.1.0/src/Native/Runtime.js#L449-L460.
|
Reopening this issue here, since it was closed over at elm-lang/elm-reactor#107, because the reactor does not at the moment actually do any hot-swapping (it just swaps and replays). On the other hand, http://elm-lang.org/try does use hot-swapping, and is affected by the difference of actual implementation from what the "Interactive Programming" post says. The current code showing that only the structure, not the types, are compared on hot-swap is here: https://github.com/elm-lang/core/blob/2.1.0/src/Native/Runtime.js#L449-L460. |
jvoigtlaender commentedJan 7, 2015
On http://elm-lang.org/blog/Interactive-Programming.elm, it is said: "The hot-swapper can also check to see if the types of the old state matches the types of the new state, ruling out a whole class of hot-swapping-induced runtime errors."
However, that checking is not currently done by the hot-swapper.