IntelliJ Elm Plugin future

Replying also to @adamnfish

Hi, I recently started renovating the plugin in a fork and already have some success with elm-review integration, Lamdera project support (https://dashboard.lamdera.app/docs), some minor fixes and deprecation removals and last but not least, using IntelliJ latest plugin platform as a base for building etc. Given the amount of issues that have accumulated in the original repository, I can not yet claim that I am fully able to maintain it, but as a previous contributor, I can give it a shot.
Currently my fork will require IntelliJ 2021.1 or later.

So aside from my ongoing work on the toolwindows (compiler and elm-review), it would be very interesting to know, what issues currently are the most pressing ones.

Any feedback welcome.

27 Likes

Very happy to hear this! I am very happy with the plugin in its current state. The most pressing for me is to actually make it work in the new version(s) of IntelliJ. Nice to hear there are new features being developed but personally I only use the editor/refactoring features. So I will leave it to others to feedback on those. :slight_smile:
Now that I think about it. Since I use the “External Tools” thing to run builds etc in the console I would like it if errors shown there would link to the file/row. (I tried to set that up myself some time ago using “Output filters” but had no luck.)

Anywhere one can find a build to test?

Hi, the Elm Compiler Toolwindow actually enables navigating (forward&previous) to the exact locations.
The error reports that are linked to each location are something I currently work on, so that the nice messages from the Elm compiler and elm-review are displayed better and ideally respecting the IJ appearance theme (dark or light).

When I am done, I can try to publish the plugin as an installable ZIP… maybe on Github, we’ll see.
Thanks for the feedback!

3 Likes

This is great news! I would love to try your version of the plugin in a zip.

When you have different files with a main, which one is selected is arbitrary. It would be great to be able to choose which main file you want to use.

Also, when you refer to directories of of the scope of the IntelliJ project, the Elm plugin treats them as missing, even though everything compiles fine. IntelliJ is able to deal with files outside the project, so it might not be such a big deal to implement this.

Thanks!

1 Like

Here I have uploaded a short video of the work in progress.
It shows a new “Frinedly Messages” toolwindow, that finally obeys dark/light IJ appearance and correct scrolling (it is Html and wrapping makes no sense anyway because of the error markers from the tools).
After running a tool (be it the Elm compiler or in this case elm-review), you can navigate immediately through the messages by the conventional IJ shortcuts (next/prev occurence).

I think, this gives a better area for the report-messages. There could be a setting, to not show the new messages window at all of course.
Let me know what you think.

Btw, this runs in the most current version of IntelliJ and is a Lamdera project

5 Likes

if the current Main detection has flaws, this would have to wait until renovations and integrations are done.
But if you can describe your case in more detail, it would help in any case

I will try to be more specific:
We have 2 entry points in our project, one to run the application and the other one is a stripped down version that is used to render PDFs with puppeteer. When we open files that are imported both from ConsumerApp.elm and CertificatePdf.elm, the compiler only compiles CertificatePdf.elm, so we are not able find all compilation errors related to the usages related to ConsumerApp.elm unless we temporarily rename main into main1 inside the CertificatePdf.elm file.

I see. Do your applications show up here as 2 project entries ?
If so, we would basically have to compile + show messages of all projects somehow… ?

Best thing would be to send me your stripped down project example (with 2 main)

Just published a ZIP installable release:

Download the ZIP and install by IntelliJ’s action “Install Plugin from Disk…”
You need to assign shortcuts to the actions “Run elm-review” + “Elm Build Project”… toolbars are still missing the build-icon
This is not a production-ready release I’d say, but I do think it should be stable and shouldn’t have broken any previous functionality. And don’t forget to try out Lamdera :slight_smile: Any feedback welcome.

Since it is not clear, if this will (ever) land in the forked-from repo, I have not setup any Plugin-publication for the IJ marketplace yet.

6 Likes

Awesome! I will tell you if I find any issues. Thank you!

Hi @francescortiz meanwhile I have reproduced your project setup. This should be solvable !
You could actually create an issue with your last description of the problem here:

Elm format on save doesn’t seem to be working now. I tried in 2 different projects and I get the same issue. I have created a FileWatcher to work around the issue for now.

I don’t see the issues tab. They might no be enabled.

just activated issues

@francescortiz
format-on-save should be fixed now
Please try 5.0.0-beta3

3 Likes

Correct, now it works. Thanks for the quick fix.

1 Like

This is fantastic @clojj! Thank you very much.

I am building your fork from source and using the plugin in the latest WebStorm (2021.3.2) on a project with about 32k lines of Elm. Seems to work well so far. Thanks again! Please let us know if there is any way to support your efforts.

1 Like

Hey didn’t have time to take a serious look to your work but this looks great, thank you for making this tool up to date !

I am pretty happy with the current tool, there are just some complicated situations where the plugin doesn’t catch type error / exhaustiveness checking but that’s pretty fine, those situations don’t arise a lot :slight_smile: .

So just a short message to say THANK YOU SO MUCH !

4 Likes

Hi, if you can describe these cases in detail, please feel free to create an issue in my Github repo.
Of course these kind of issues will (for me anyway) require longer investigation or even (hopefully) some support from the original contributors of the type-checking part of this plugin.

2 Likes

work continues here

7 Likes