Skip to content

Instantly share code, notes, and snippets.

@simonmichael simonmichael/a.org
Last active Mar 15, 2019

Embed
What would you like to do?
intellij-haskell 0.44 notes

intellij-haskell 0.44 feedback

tested with IntelliJ IDEA 2018.3, mac mojave, 2013 macbook air with 8G ram, hledger repo

issues

had to remove alpha plugins repo to see beta 44

installed smoothly in a few minutes (most things probably previously installed)

continuing intermittent errors about starting stack repl taking more than 5s and haskell support not available yet

while building hoogle db ?

turned off power save mode for inspections, and for hlint installation to complete (?)

type signature on hover seemed to work intermittently, was hard to discover

I tried all of these, only the last works, shouldn’t it be just hover ? Or at least, don’t require moving off word

hover over word ?
click in word ?
select word ?
hover over word while holding CMD ?
move pointer over word from outside it while holding CMD ? (first move off word if already over it)

installing hlint got stuck, showing “Busy with installing hlint” for hours; it completed after restarting the IDE

saw a message advising using Tools menu to rebuilding hoogle db, menu option was disabled until hlint/hoogle etc. finished installing

do background tasks generate output separate from what appears in the event log ? how do you see it ?

a certain open file got reloaded in the repl every few minutes

what to do about “ambiguous stack target” warning

cmd-click sometimes didn’t show usages the first time, had to wait a little and try again

frequently gets horribly slow and choppy during editing

analyze dependencies (of a few open files) hung IDEA for a few minutes

show usages does not show cross-package usages ?

haskell problems pane

doesn’t update right away, eg moving defs to another file in same directory, had to resave a file ?

didn’t show errors in another package (hledger-ui) for a minute or two

didn’t hide hledger-ui error when fixed in library package (hledger-lib)

restarting repl didn’t help, I think
invalidate caches and restart helped
would a running ghcid confuse it ?

refactoring

rename (S-F6) is unreliable, often doesn’t find all matches even a few lines away

optimize imports didn’t always work (didn’t remove Control.Arrow after dropping &&& usage)

non intellij-haskell issues ?

why is it saving so often as I type, without switching frames ?

in event log, could not re-enable scroll to the end

likes

navigate to definition, navigate to usages working

all dependencies’ source available

smart detection of packages, directory/file types

completion of imports working

questions

can I make it ignore cabal sections I don’t care about for performance, like tests and benchmarks ?

@rikvdkleij

This comment has been minimized.

Copy link

commented Mar 15, 2019

continuing intermittent errors about starting stack repl taking more than 5s and haskell support not available yet
while building hoogle db ?

Yes, I also noticed that sometimes. It seems that only one stack command can run at a time (the other gets blocked). Also made a delay between starting the REPLs otherwise same issue. Hopefully next beta will be more stable because REPLs will be started with -fobject-code

@rikvdkleij

This comment has been minimized.

Copy link

commented Mar 15, 2019

turned off power save mode for inspections, and for hlint installation to complete (?)

Installing hlint got stuck, showing “Busy with installing hlint” for hours; it completed after restarting the IDE

Could not reproduce issues with installing Hlint (and other Haskell tools)

@rikvdkleij

This comment has been minimized.

Copy link

commented Mar 15, 2019

I tried all of these, only the last works, shouldn’t it be just hover ? Or at least, don’t require moving off word
hover over word ?
click in word ?
select word ?
hover over word while holding CMD ?
move pointer over word from outside it while holding CMD ? (first move off word if already over it)

You can use the shortcuts in menu View / Haskell (also for selection) or hover over identifier while holding the Ctrl/Cmd key down

@rikvdkleij

This comment has been minimized.

Copy link

commented Mar 15, 2019

saw a message advising using Tools menu to rebuilding hoogle db, menu option was disabled until hlint/hoogle etc. finished installing

That's right, plugin needs Hoogle to build Hoogle db.

@rikvdkleij

This comment has been minimized.

Copy link

commented Mar 15, 2019

do background tasks generate output separate from what appears in the event log ? how do you see it ?

Yes, in case there are warnings/errors (no need to enable the Event log)

@rikvdkleij

This comment has been minimized.

Copy link

commented Mar 15, 2019

a certain open file got reloaded in the repl every few minutes

Could be the action after library code is rebuild.

@rikvdkleij

This comment has been minimized.

Copy link

commented Mar 15, 2019

what to do about “ambiguous stack target” warning

That is because the Cabal file does not unambiguous defines to which Cabal component/stanza a file belongs.
So for example in hledger-lib.cabal:

library
hs-source-dirs:
      ./.
test-suite doctests
hs-source-dirs:
      ./.
      test

So all the files in hledger-lib can be part of library or test component.

Btw, next beta will always prefer library component.

@rikvdkleij

This comment has been minimized.

Copy link

commented Mar 15, 2019

frequently gets horribly slow and choppy during editing

show usages does not show cross-package usages ?

Those should be improved in next beta

analyze dependencies (of a few open files) hung IDEA for a few minutes

Never tried that myself 😄 Will investigate that.
EDIT: can reproduce that issue.

@rikvdkleij

This comment has been minimized.

Copy link

commented Mar 15, 2019

oesn’t update right away, eg moving defs to another file in same directory, had to resave a file ?
didn’t show errors in another package (hledger-ui) for a minute or two
didn’t hide hledger-ui error when fixed in library package (hledger-lib)
restarting repl didn’t help, I think
invalidate caches and restart helped
would a running ghcid confuse it ?

Have to reproduce/investigate that.

@rikvdkleij

This comment has been minimized.

Copy link

commented Mar 15, 2019

rename (S-F6) is unreliable, often doesn’t find all matches even a few lines away

Should be fixed/improved in next beta. It's really a challenge to get that solid over multiple files/components.

optimize imports didn’t always work (didn’t remove Control.Arrow after dropping &&& usage)

Yes, the Hlint integration has to be improved to get feature more stable. Already know the issue, contacted Neil Mitchell so I know what to but need time (currently low prio for me).

@rikvdkleij

This comment has been minimized.

Copy link

commented Mar 15, 2019

why is it saving so often as I type, without switching frames ?

Yes agree, looked for a setting to save less frequently but could not find that. Maybe it helps to disable "safe writes" option.

@rikvdkleij

This comment has been minimized.

Copy link

commented Mar 15, 2019

can I make it ignore cabal sections I don’t care about for performance, like tests and benchmarks ?

I do not understand why you want that? Should not give issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.