elm-community / elm-webgl

Moved to elm-explorations/webgl
http://package.elm-lang.org/packages/elm-explorations/webgl/latest
BSD 3-Clause "New" or "Revised" License
95 stars 22 forks source link

Repository field in elm-package.json affects correctness of generated Javascript #15

Closed genthaler closed 8 years ago

genthaler commented 8 years ago

I tried copying /examples/elm-package.json and /examples/first-person.elm to a new project, setting the repository in elm-package.json to

"repository": "https://github.com/genthaler/first-person-elm-start-app-simple.git",

and adding

"elm-community/elm-webgl": "2.0.0 <= v < 3.0.0"

This failed to load in Chrome, with the errors:

first-person.elm:4573 Uncaught TypeError: Cannot read property 'createNode' of undefined(anonymous function) @ first-person.elm:4573(anonymous function) @ first-person.elm:5096(anonymous function) @ first-person.elm:12681
first-person.elm:10 Uncaught TypeError: runElmProgram is not a function(anonymous function) @ first-person.elm:10

If I set the repository to

"repository": "https://github.com/aenthaler/first-person-elm-start-app-simple.git",

(i.e. genthaler -> aenthaler) then it runs.

I suspect it only works if the repository field is lexicographically earlier than "https://github.com/elm-community/elm-webgl.git".

Feel free to clone the project at https://github.com/genthaler/first-person-elm-start-app-simple

w0rm commented 8 years ago

@genthaler I cloned the project and everything worked for me. Can you confirm that this is fixed and close the issue?

genthaler commented 8 years ago

I agree, no longer seems to be happening. I was able to reproduce this issue with another project around the same time, so I'm guessing something's been fixed underneath.