rikvdkleij / intellij-haskell

IntelliJ plugin for Haskell
https://rikvdkleij.github.io/intellij-haskell/
Apache License 2.0
1.32k stars 95 forks source link

how to update from older version without losing project settings ? #320

Closed simonmichael closed 5 years ago

simonmichael commented 5 years ago

Thanks a lot for Intellij-Haskell. I just discovered that there are unreleased newer versions available. So I'd like to test, but I don't want to lose my project's IDEA settings, at least not yet. I tried to create a new project with same src dir, but it wants to overwrite the .idea directory. I don't know if that will wipe settings or not.

Could docs be updated to say how/if we can upgrade, without losing project settings ?

rikvdkleij commented 5 years ago

Thanks that you like to test!

Sorry, I do not know how to save or migrate your project settings. The importer is also improved so also the structure of the libraries in the setting files.

Maybe for testing you can copy your project and import that project?

rikvdkleij commented 5 years ago

Hi @simonmichael I'm curious if the plugin works for you. (I'm still busy with improving :-) )

simonmichael commented 5 years ago

Hi @rikvdkleij , thanks for the ping and for improving things. I have done a little more testing, using the hledger repo. I have cloned it to "hledger2" and imported this as a new IDEA project, per https://github.com/rikvdkleij/intellij-haskell#getting-started. I plan to see how far I can get this working. Then somehow redo or transfer the config back to the original "hledger" working copy. (Because I don't want to end up with "hledger2" in paths, or lose all the non-git-controlled content in that copy.) I'll keep a snapshot of "hledger" also, for comparing old and new configs in case I find something missing from my settings later.

My experiences so far are probably beyond the scope of this issue, I'll just briefly mention them, feel free to direct/cut-paste me elsewhere:

simonmichael commented 5 years ago
rikvdkleij commented 5 years ago

Thanks for your reports!

Sorry but the getting-started is not valid for the latest betas. All Haskell tools are now automatically installed by the plugin ( I assume you have installed the latest beta, beta30).

The yellow info balloon is notifying that if you want Hoogle navigation support, you have to generate the Hoogle database.

So by looking to your issues I think you just have to import your project and let the plugin do it's work :smile:

rikvdkleij commented 5 years ago

So all Haskell tools are build by using resolver LTS-11, except intero, intero is build per project because it has to be build by same GHC version as project.

rikvdkleij commented 5 years ago

I did not yet test with GHC 8.6. Have to take a look why plugin with intero does not work for that version.

rikvdkleij commented 5 years ago

While this was running, the Haskell submenu disappeared from the Tools menu.

That is intended, while project is built/initialized I have to prevent those action there.

rikvdkleij commented 5 years ago

when I CMD-click on things, I see a lot of warnings like "Ambiguous Stack target for file /Users/simon/src/PLAINTEXTACCOUNTING/hledger2/hledger-lib/Hledger/Data/Transaction.hs. It can belong to the source dir of more than one Stack target/Cabal stanza. The first one of Set(hledger-lib:lib, hledger-lib:test:doctests, hledger-lib:test:easytests) is chosen."

Those messages are intended. The plugin starts per Stack component a Stack REPL and has to know in which REPL a file has to be loaded. This message gives warning that in which REPL that file has to be loaded is ambiguous.

simonmichael commented 5 years ago

That is intended, while project is built/initialized I have to prevent those action there.

If it's possible, better to grey out the submenu or its items I think. Seeing it disappear made me doubt myself, then the software, then you. :)

rikvdkleij commented 5 years ago

If it's possible, better to grey out the submenu or its items I think. Seeing it disappear made me doubt myself, then the software, then you. :)

Okay, I wrote it wrong 😄 My intention was to disable those options but for some reason they are not visible. I remember that I already took a look to it in the past and came to the conclusion that it was a IntellliJ bug with submenus but I will take another look. Can also be my mistake....

rikvdkleij commented 5 years ago

Took a closer look: when all menu options are disabled they disappear. Do not know how to solve that. Looks like an IntelliJ bug in submenu's.

In the latest beta's the Haskell tools are build with LTS-12. Btw, that resolver for Haskell tools is fixed (independent of your local GHC version) to prevent API incompatibilities.

rikvdkleij commented 5 years ago

Please reopen when it's still an issue.