halohalospecial / atom-elmjutsu

A bag of tricks for developing with Elm. (Atom package)
https://atom.io/packages/elmjutsu
MIT License
192 stars 24 forks source link

Goto definition corepacakage wrong path #17

Closed Rolograaf closed 7 years ago

Rolograaf commented 7 years ago

Hi, sorry I am on Win10...

When I tried your plugin, I Ctrl-clicked on onClick in my source. It could not open file ...\elm-stuff\packages\elm-lang\html\1.1.0\src\Html.Events.elm because it is in ...\elm-stuff\packages\elm-lang\html\1.1.0\src\Html\Events.elm

probably Windows related or small bug?

halohalospecial commented 7 years ago

It's probably a bug. I'll fix it tomorrow. Thanks for reporting!

halohalospecial commented 7 years ago

Hi @Rolograaf I couldn't reproduce the issue :-( Can you give more information on your project structure and where you're invoking Go To Definition? Thanks!

Rolograaf commented 7 years ago

You are correct -- at first I could not reproduce neither. Only change to Atom I saw was the atom-beautify plugin auto-update. So I checked that and looked for any other updates.

Then I went back to my elm file and Ctrl-clicked onClick again, and there was the error again...

image

Weird? button works as it is in ...\elm-stuff\packages\elm-lang\html\1.1.0\src\Html.elm it is a local project but also on github

Thank you for looking into this, but when bug keeps as intermittent I blame Windows and regard as unsolvable...

halohalospecial commented 7 years ago

Same result on elmlive-aws-cognito :-) I ctrl-clicked on onClick in import Html.Events exposing (onClick, onInput) in Main.elm.

There's probably an edge case somewhere based on your workflow. If you want, you can put a temporary console.log('symbol.sourcePath', symbol.sourcePath); at this part: https://github.com/halohalospecial/atom-elmjutsu/blob/f465a58bf92ca84919f0c653961b88bf9efc8470/lib/core.js#L74 . The file is in $ATOM_HOME/packages/elmjutsu/lib/core.js, where $ATOM_HOME is Atom's directory.

Just let me know if you need more help :-)

Rolograaf commented 7 years ago

Never mind, elm is so comfortably safe, this gets me back to living on the edge (-case) I thrust that Html.events do what they promise, no need to go onClicking any deeper