Closed marceloomens closed 6 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.
Thanks for the report!
I looked for authors on http://package.elm-lang.org/ with names longer than 13 chars and found a few:
MichaelCombs28
ThinkAlexandria
VerbalExpressions
andrewMacmurray
So I am not convinced the name length is the underlying cause. Do you mind digging around more in the compiled code to see why embed
is not defined? Sometimes the root issue can get masked in how the error is output by JS if it is a code generation issue. If you find anything, please open an issue at https://github.com/elm-lang/elm-compiler/issues outlining it!
Thank you for looking into this!
Oh, it may just be that you gotta delete elm-stuff/
after you change the repo name! I can imagine the compiler could get confused if names changed and it had some old compiled artifacts around!
There some discussion on other issues about restrictions on the
repository
field inelm-package.json
. It's not ideal that this field is restricted to Github repos, but that's workable for now. The restriction on lower case letters is also workable, as Github usernames and repos and non-case sensitive.I have a problem with the restriction on the length of Github username though. Usernames of 13 or less work fine, for example:
But when I change this to a (correct) username of more than 13 characters, the generated javascript throws an error. For example:
The error that is thrown at runtime, is the following:
Are there any workarounds? Are there any fixes in sight? While all lower case usernames are acceptable in a Github URL, even if the orginal username contains upper case characters, truncated usernames are not accepted by Github 😞
I'm using Firefox 58.0.2 on Mac OS 10.13.3 with Elm 0.18.