Skip to content

Instantly share code, notes, and snippets.

@simonmichael
Last active March 15, 2019 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonmichael/7f7305b9351b2a2e450c39f7ad128f4c to your computer and use it in GitHub Desktop.
Save simonmichael/7f7305b9351b2a2e450c39f7ad128f4c to your computer and use it in GitHub Desktop.
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
Copy link

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
Copy link

rikvdkleij 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
Copy link

rikvdkleij 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
Copy link

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
Copy link

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
Copy link

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

Could be the action after library code is rebuild.

@rikvdkleij
Copy link

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
Copy link

rikvdkleij 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
Copy link

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
Copy link

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
Copy link

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
Copy link

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