Skip to content
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

added implementation for elm #2507

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ArnaudParan
Copy link

Hi guys, the current implementation did not work for me but that version that I corrected works like a charm. Does it fit with your way of doing things?

@blueyed
Copy link
Member

blueyed commented Nov 8, 2020

Thanks, do you have (raw) example output where it was failing before with?
Would be happy to add this as a test then (to get full coverage).

@ArnaudParan
Copy link
Author

ArnaudParan commented Nov 14, 2020

Thanks, do you have (raw) example output where it was failing before with?
Would be happy to add this as a test then (to get full coverage).

Hi, sorry that I took time to reply to you and thanks for the interest.

Well, first, now elm-make is part of elm/core, and thus we could add functionality for the new syntax "elm make" which is the standard way to use the maker now, but even replacing that part, it seems that elm make changed a lot since the last update in neovim (my elm version is 0.19.1), because I get just no errors with the implementation which is present now. For example, if I alias elm make with elm-make or even create an elm-make which calls elm make, I get absolutely no errors when I should get them. For example, a code as simple as

concat : String -> String
concat s1 s2 =
  s1 + s2

which should produce an error in elm produces no error with the current implementation in neomake

image

with my implementation, there are errors printed (which there should be)

image

However, the weakness of my implementation is that the new elm make version does not deal with files which have unusual names, so when neomakes creates a file because you didn't save yet, there is an error from elm make


['{"type":"error","path":null,"title":"UNEXPECTED FILE NAME","message":["I am having trouble with this file name:\n\n    ",{"bold":false,"underline":false,"color":"RED","string":"frontend/.Test.elm@neomake_103840_3.elm"},"\n\nI found it
in your /patho-on-my-computer/frontend/\ndirectory which is good, but I expect all of the files in there to use the\nfollowing module naming convention:\n\n    +--------------+--------------------------------
----------------------------------------------+\n    | Module Name  | File Path                                                                    |\n    +--------------+-------------------------------------------------------------------
-----------+\n    | Main         | /path-on-my-computer/frontend/Main.elm         |\n    | HomePage     | /path-on-my-computer/frontend/HomePage.elm     |\n    | Http.Helpers |
/path-on-my-computer/frontend/Http/Helpers.elm |\n    +--------------+------------------------------------------------------------------------------+\n\nNotice that the names always start with capital letter
s! Can you make your file\nuse this naming convention?\n\n",{"bold":false,"underline":true,"color":null,"string":"Note"},": Having a strict naming convention like this makes it a lot easier to find\nthings in large projects. If you see a
 module imported, you know where to look\nfor the corresponding file every time!"]}']

if I print it a little prettier it means that


I am having trouble with this file name:

    frontend/.Test.elm@neomake_103840_3.elm

I found it in your /path-on-my-computer/frontend/
directory which is good, but I expect all of the files in there to use the
following module naming convention:

    +--------------+------------------------------------------------------------------------------+
    | Module Name  | File Path                                                                    |
    +--------------+------------------------------------------------------------------------------+
    | Main         | /path-on-my-computer/frontend/Main.elm         |
    | HomePage     | /path-on-my-computer/frontend/HomePage.elm     |
    | Http.Helpers | /path-on-my-computer/frontend/Http/Helpers.elm |
    +--------------+------------------------------------------------------------------------------+
Notice that the names always start with capital letter
s! Can you make your file\nuse this naming convention?
Note: Having a strict naming convention like this makes it a lot easier to find
things in large projects. If you see a module imported, you know where to look
for the corresponding file every time!

basically, the problem here is that .Test.elm@neomake_103840_3.elm is not a valid filename, however, at least, with the version I implemented, neomake works when we save the elm file in vim. With the old version, that does not work as I shown.

I don't know how you handle backwards compatibility, so as I did not want to break it, I non invasively added a maker instead of replacing the one which is already there.

I hope that I have been helpful. If what I say is unclear, I would be glad to add the details you ask me, but you can just try with the example of code I gave you, get the new elm, you can get it there elm install page and try the old neomake version and my version, you should be able to reproduce all the things said there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants