elm-lang / elm-platform

Bundle of all core development tools for Elm
BSD 3-Clause "New" or "Revised" License
762 stars 125 forks source link

Running elm-{reactor,make} in directory containing periods produces invalid JavaScript #206

Closed sonnym closed 6 years ago

sonnym commented 7 years ago

Since this affects both reactor and make, I presume it is actually an issue with the compiler, but since I am not sure, I am hoping this is the best place to post for triage.

The generated JavaScript looks like: var _sonnym$sonnym.github.io$Main$main = _elm_lang$virtual_dom$Native_VirtualDom.staticProgram( where sonnym.github.io is the directory from which I am running the commands.

This issue happens with any valid program, including the "Hello, World!" example from the website. Invalid programs, on the other hand, still give perfectly cromulent error messages, which is certainly a testament to the robustness of the compiler.

If you need any additional information about this, please let me know. Thanks!

process-bot commented 7 years ago

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

sonnym commented 7 years ago

A correction on this issue - it appears that the variable name is actually generated from the value of the repository defined in elm-package.json.

evancz commented 6 years ago

This should be resolved in 0.19 because (1) applications no longer have a name like this and (2) packages do not allow dots in the names. So either way, this cannot happen anymore. Sorry for the trouble!

sonnym commented 6 years ago

No worries, thank you for the update!