-
Notifications
You must be signed in to change notification settings - Fork 63
Module name may cause hot swapping to fail #50
Comments
And this seems to be tied to the letter T? Does it work when renaming to |
It works renaming it to several other things. I tried: |
You do get the same error if you rename the module to something that is not the same as the filename. |
Here's my understanding. You go to http://localhost:8000/Test.elm and start changing code. That works. You change the module name in the Elm code itself, the file name remains Now if you rename the file to anything else http://localhost:8000/Test.elm should die. I don't see how it can be otherwise. Can you walk me through the exact thing you want and how it is going wrong? |
I made a video of the problem: https://www.youtube.com/watch?v=odV6cBySLqQ The video follows this process:
It looks like modules starting with |
It is conceivable that this issue is related, but I don't really see the connection here. I think this needs more digging, I have no intuition. Are you able to take a look at this? I need to get types working with elm-repl again today. |
Yeah. I'll keep digging. |
I get the same error when having hot swapping activated and just starting to type in my text editor (not even saving). I'm on Mac and using 0.14. |
What is the name of your module? |
I have tried a bunch – "Hej", "Test" and "Erik" I think :) |
I am assuming changing the name has no effect? For me, changing the name made a difference. |
Same issue here. I can't swap either of the samples in https://github.com/evancz/elm-examples. Renaming Hello.elm to AnOkayModuleName.elm doesn't fix it, UNLESS I also add the module declaration to the top of the file, as in @jcollard's opening example: module AnOkayModuleName where on the other hand, adding |
Also getting this with index.elm module name Index. |
Additionally get
in terminal when running elm-reactor, after a while, at which point elm-reactor crashes |
I've heard a bunch of reports of this, so I'm gonna try to figure it out and maybe do a 0.14.1 release with this and some other fixes. |
@jcollard, do you mind trying with the latest stuff? I think I found and fixed a bug in which the module that gets swapped in was whatever module came first alphabetically. I think it was a hack that relied on some pattern in the old code generation code, and it survived the transition to 0.14. |
It doesn't seem to be crashing anymore. However, I am not getting any hot swapping when building from the master on this repo. |
Wait... for some reason It shows I am using elm-compiler 0.13. I'm going to rebuild everything from scratch and try again. |
This looks fixed. I cannot get it to fail anymore. |
Phew! Thanks for trying this out! It's sort of crazy that any program On Sunday, December 21, 2014, Joseph Collard [email protected]
Sent from Gmail Mobile |
Okay, folks can check out the 0.14.1 alpha and see if it is fixed there: https://groups.google.com/forum/#!topic/elm-discuss/KHg-aeFvDN0 |
Yes, it works. Yay and thanks! |
Great, thank you for the confirmation! |
Given the file
AnOkayModuleName.elm
with contents:If you run
elm-reactor
in the same directory asAnOkayModuleName.elm
and debug it, hot swapping works fine. That is, you can change 42 to 45, save, and view the changes immediately.However, changing the module name to
Test
and the file name toTest.elm
causes hot swapping to fail. That is, it loads up fine but any change to the file (even without saving) causes the following error to be displayed in the browser:I played around with it some more and the following file/module names also fail:
Test2
,TheTest
,Two
,Three
It looks like anything that starts with a
T
will fail in the same way.The text was updated successfully, but these errors were encountered: