New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot-swapper does not check types of new states vs. old states #81

Closed
jvoigtlaender opened this Issue Jan 7, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@jvoigtlaender
Contributor

jvoigtlaender commented Jan 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.

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender
Contributor

jvoigtlaender commented May 18, 2015

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz May 18, 2015

Member

Yeah, can we move this issue over to that repo?

Member

evancz commented May 18, 2015

Yeah, can we move this issue over to that repo?

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender May 18, 2015

Contributor

Sure, will do.

Contributor

jvoigtlaender commented May 18, 2015

Sure, will do.

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

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.

Contributor

jvoigtlaender commented Jul 16, 2015

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 jvoigtlaender reopened this Jul 16, 2015

@evancz evancz closed this May 11, 2016

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