haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 210 forks source link

Manage initial module loading UI process #460

Open alanz opened 6 years ago

alanz commented 6 years ago

At the moment, when a file is opened, we request diagnostics on it as usual, and return a "Module not Loaded" error message.

Once the compilation is complete, if it succeeds, then we start getting hover info etc. If the compilation fails, we continue to get the "Module not Loaded" warning.

We need to manage UI messaging better.

  1. Initial "Loading module" message rather than an error
  2. Return a message when the loading process completes, with the outcome
  3. If the module load fails due to errors in the current module, send those as diagnostics
  4. What if the load fails for errors in another module?
nponeccop commented 6 years ago

See also the monotonicity considerations of #416. Essentially it is

  1. What if module compilation fails, but we have stale compilation results for it?

Especially in the case 4.

alanz commented 6 years ago

There is also case 0, hie GHC version does not match project GHC version

alanz commented 6 years ago

We need to revisit this, based on real world feedback.

cc @reactormonk