Elm Documentation in Atom

Whenever I try to write Elm documentation Atom hangs.

I am trying to write:

{-| This function… but I cannot. Every time Atom would freeze and then I can just Force Close.
How can I debug this?

Does Atom freeze when you type other things that aren’t {-| This function…? If so, when does Atom freeze? When does it not freeze? Does it freeze when you start it from the command line with atom --safe?

No Atom does not freeze when I type other things.

It used to freeze when I wanted to write Elm documentation using this syntax mentioned above.

It used to freeze after 3-4 characters after {-|.

I have written that it used to do that but after running in safe mode and then normal mode again it seems to work as it should.

I will keep testing since I have a lot of Elm documentation to be written.

The important thing is to narrow down the circumstances in which the issue occurs until you can make it happen on purpose. Then, if you teach someone else on this forum how to make it happen, we can figure out the cause.

Now it freezes again.

I have been working with Elm file. I have added this onLinkClick function.

elm-linter package says that this function does not have a type annotation.

So I am trying to fix this as I have forgotten to add this.

However when I will try to write anything after onLinkClick then Atom freezes.

What I would like to type is space and the colon but I cannot.

I have removed this one line and typed this one again and then it works.

I will try to narrow the scenario even more.

When Atom freezes, how much is frozen? You’ve said that you can’t type, but can you right-click? Can you use the tree view or the menu bar? How do you get back from Atom being frozen?

No, I cannot right-click. I can use neither tree view nor menubar.

After couple seconds there is a pop-up window saying that Atom has stopped responding and I can choose to keep waiting for Atom to start responding or do the Force Close.

I tried couple times to keep waiting but situation did not change, I had to choose Force Close and start Atom again.

Okay, it sounds like there’s a package that’s trying to do some work behind the scenes and isn’t able to do what it needs to do (for whatever reason). Since Atom is built on Chrome with JavaScript, it allows packages to block the entire UI if they aren’t designed to be properly asynchronous. Under normal circumstances, this might not be noticeable, but if the synchronous code has to wait for an HTTP response or the processor is busy, then the whole editor will hang while that one process tries to resolve itself. I think that’s what’s happening to you.
Based on the presence of a linter error, you should try disabling elm-linter and then trying to repeat the freeze. If it still happens, then go through and disable each Elm-related package you have one at a time.

I have started disabling Elm-related packages but in the mean time (for testing) I have disabled GitHub package and right now my latest guess is actually GitHub package that causes this behaviour.

I will keep testing…