-
Notifications
You must be signed in to change notification settings - Fork 663
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
Code generation creates identifiers starting with invalid characters #1763
Comments
Example of generated code: var 1602$json_schema$Json$Schema$Builder$SchemaBuilder = function (a) {
return {$: 'SchemaBuilder', a: a};
}; (when using 1602/json-schema package) |
Is there a plan to patch this bug within 0.19.x? People keep asking me what to do if they want to use some of my elm libraries, I'd appreciate some insight here. |
As a workaround you could run a find and replace on the generated Javascript. |
Doing a new release of binaries is quite expensive. It takes maybe a three days to get everything set up, and then I need to have a testing phase for the community to see if it works on a bunch of different platforms. Then the folks who manage other install paths like npm, homebrew, and aur need to get things working. All together, this is a pretty big cost across quite a lot of people, so I would like to get a decent number of fixes together before putting something out. I don't know what the best path is in your scenario. |
Yup, it makes sense to batch bug-fixes and release them all at once, given costs associated with the compiler release. Speaking of my projects, I think it would be okay to rename. |
Certain generated variable names start with the username of the account that published the package they're in. If that username begins with an invalid character (i.e. a number), the code generates errors and does not run.
I discovered this while trying to use https://package.elm-lang.org/packages/1602/elm-feather/latest/
From what I can tell this is a problem introduced with the changes in 0.19, because I was using this same package in 0.18 without problems.
This error can be reproduced simply by compiling an Elm program using
1602/elm-feather
, but I have a compilable example you can see here: https://github.com/MightyAlex200/Comet/tree/ui-elm-19Just run
make
inui/
, then openindex.html
Related to #1377 and #710
The text was updated successfully, but these errors were encountered: