Generated code invalid for a repo with a dot in its name

I have an Elm app in a repo named after a domain (foo.cz). The repo name somehow ends up as a part of the generated Javascript symbol names:

var _zoul$foo.cz$Victim$decodeLatLong = function (str) { … }

This annoys my browser (Safari):

SyntaxError: Unexpected token '.'. Expected ';' after variable declaration.

(According to this Javascript variable name validator a dot is invalid in a Javascript variable name indeed.) When I remove the dot from the repository field in my elm-package.json, the issue disappears. Is this an error on my side, or is it worth a bug report?

Edit: I see, this was already reported, twice even. It looks like the solution, at least for my case, is simply dropping the repo link from the package description once 0.19 ships (and using a dummy repo link in the meantime).

1 Like