Comments (14)
errors tab gets cleared
That is very unexpected. This actually shouldn't happen.
A bit of a design explanation. Every package that can show messages via ide-haskell output panel manages it's own messages completely and sets those more or less atomically. Messages from different sources, in general, do not interfere, with one exception: if literally the same messages (meaning location, text, etc are the same) already exist, "ownership" gets reassigned.
Lint is handled by haskell-ghc-mod. Build errors can come from either haskell-ghc-mod or ide-haskell-cabal.
In any case, I can't imagine a scenario where error tab would be cleared.
More detailed reproduction instructions could help.
from ide-haskell.
@lierdakil The instructions above are as detailed as needed, you just need to take some file that compiles and get it to not compile, then add some unneeded parentheses or something so you get a HLint error. Once you do that you will only see the HLint tab messages but there will be no errors shown on their tab - unless you fix the HLint issue.
from ide-haskell.
Well, I can't reproduce with instructions given.
from ide-haskell.
@lierdakil A basic example to reproduce, create a file HelloError.hs
with content:
module HelloError where
add a b = a + [b]
Error tab should show the error:
/home/neo/HaskellLearning/IdeTest/src/HelloError.hs: 3, 1
- Non type-variable argument in the constraint: Num [t]
(Use FlexibleContexts to permit this)- When checking the inferred type
add :: forall t. Num [t] => [t] -> t -> [t]
Now put parentheses around a
to get a HLint issue:
module HelloError where
add a b = (a) + [b]
The error will be shown for a split second then the Error tab will be cleared and only the HLint will be focused and shown it its tab:
/home/neo/HaskellLearning/IdeTest/src/HelloError.hs: 3, 11
Redundant bracket
Found:
(a)
Why not:
a
from ide-haskell.
Well, I still can't repro, but the particular way you're phrasing this makes me wonder what your haskell-ghc-mod settings are. In particular, 'Check/Lint On Change/Save'
from ide-haskell.
haskell-ghc-mod has:
- On Save Check set
- On Save Lint set
- On Change Check unset
- On Change Lint unset
The issue I am getting is upon saving the file after making the changes.
from ide-haskell.
Huh... I think having only one of 'Change/Save' enabled can lead to the described behaviour (at least I did find a bug in the implementation, which I just fixed in [email protected]). But with these settings, I honestly have no idea how that would be possible since both check and lint results are set together.
EDIT: re-reading, it's not obvious what I mean by "only one of 'Change/Save' enabled". What I mean is situations similar to this:
- On Save Check
- On Save Lint
- On Change Check
- On Change Lint
Check that you're running Atom >= 1.23.3 and all related packages are up to date. You might as well test [email protected], on the off chance that it somehow helps with this issue.
And just to show that I've actually tried reproducing:
from ide-haskell.
I am running Atom 1.23.3 and updated to haskell-ghc-mod 2.2.3 and the issue is still happening.
from ide-haskell.
No idea. Restart Atom? Reinstall ide-haskell & friends?
I'm on Gentoo with Atom installed via Nix package manager, so my environment should be pretty close to yours...
And besides, to the best of my knowledge, there are no code paths that could produce the described behaviour in the first place. Except for maybe bizarre cases where a package somehow managed to activate twice or something like that due to some obscure race condition somewhere, but you shouldn't be able to consistently reproduce an obscure race condition.
from ide-haskell.
@lierdakil I uninstalled Atom, then installed the following plugins only:
language-haskell
ide-haskell
haskell-ghc-mod
Pressing save does not show an error in the error tab - for add a b = (a) + [b]
Pressing save does show lint errors though - for add a b = (a) + [b]
If I build the project using Builder -> Build (with stack) the error is shown - for add a b = a + [b]
Fixing the error and pressing save has no effect - the error is still shown in its tab - for add a b = a + [b]
Adding parentheses does trigger the HLint on saving though. add a b = (a) + [b]
but the error tab is still empty/cleared.
Running Builder -> Build doesn't show any error but shows the lint issue - for add a b = (a) + [b]
As you can see the behavior is very flaky and in any case in which there is a HLint issue the errors can't be seen.
I was using GHC version 8.0.2 because I knew ghc-mod had issues with latest GHC versions.
I'll try downgrading cabal-install from version 2 to version 1 and see if that helps.
from ide-haskell.
Just noticed that on saving even with compiling program (add a b = a + b) the following errors/warnings appear in the developer console:
Uncaught Error: read ECONNRESET
at exports._errnoException (util.js:1022)
at Pipe.onread (net.js:572)
exports._errnoException @ util.js:1022
onread @ net.js:572
util.ts:52 haskell-ghc-mod warning:
warn @ util.ts:52
proc.once @ interactive-process.ts:131
onceWrapper @ events.js:290
emitTwo @ events.js:111
emit @ events.js:191
ChildProcess._handle.onexit @ internal/child_process.js:215
upi-consumer.ts:508 Haskell-ghc-mod: ghc-mod interactive command check failed with error GHCModInteractiveCrash caps:
{
"version": [
5,
8,
0,
0
],
"fileMap": true,
"quoteArgs": true,
"optparse": true,
"typeConstraints": true,
"browseParents": true,
"interactiveCaseSplit": true,
"importedFrom": false,
"browseMain": false
}
Args:
{
"interactive": true,
"command": "check",
"uri": "/home/neo/HaskellLearning/IdeTest/src/HelloError.hs"
}
message:cabal-helper-wrapper: /home/neo/.ghc-mod/cabal-helper/cabal-helper-0.7.3.0-Cabal-1.24.2.0: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory),ghc-mod: readCreateProcess: /nix/store/07wnp40jsxzavj5n31ld2n1536w87spa-cabal-helper-0.7.3.0/libexec/x86_64-linux-ghc-8.0.2/cabal-helper-0.7.3.0/cabal-helper-wrapper "--with-ghc=/nix/store/fd5vgah6xcwzy6xahlkl1xg637xy2n50-ghc-8.0.2/bin/ghc" "--with-ghc-pkg=/nix/store/fd5vgah6xcwzy6xahlkl1xg637xy2n50-ghc-8.0.2/bin/ghc-pkg" "--with-cabal=cabal" "/home/neo/HaskellLearning/IdeTest" "/home/neo/HaskellLearning/IdeTest/.stack-work/dist/x86_64-linux-nix/Cabal-1.24.2.0" "package-db-stack" "entrypoints" "source-dirs" "ghc-options" "ghc-src-options" "ghc-pkg-options" "ghc-merged-pkg-options" "ghc-lang-options" "licenses" "flags" "config-flags" "non-default-config-flags" "compiler-version" (exit 1): failed
log:consoleReport @ upi-consumer.ts:508
handleProcessError @ upi-consumer.ts:524
module.exports.Emitter.simpleDispatch @ :65955
module.exports.Emitter.emit @ :66071
disposables.add.backend.onError @ index.ts:403
module.exports.Emitter.simpleDispatch @ :65955
module.exports.Emitter.emit @ :66071
run @ ghc-modi-process-real.ts:145
_tickCallback @ internal/process/next_tick.js:103
from ide-haskell.
Tried with:
cabal-install version 1.24.0.2
compiled using version 1.24.2.0 of the Cabal library
and it still behaves the same way.
from ide-haskell.
Apparently, ghc-mod is not working with Cabal v.2 DanielG/ghc-mod#910 (comment)
from ide-haskell.
I installed ghc-mod for ghc 8.2.2 via DanielG/ghc-mod#922 (comment) and now I am no longer seeing the errors in the developer console.
Probably the issue was caused by partially broken ghc-mod.
Closing since I can no longer reproduce this issue.
from ide-haskell.
Related Issues (20)
- Uncaught TypeError: Cannot read property 'getPath' of undefined HOT 1
- Using `linter` for displaying errors HOT 2
- Function.extractParams is deprecated. HOT 6
- ghc-mod not working on lts-9.4 HOT 1
- Error: ide-haskell-cabal is not defined while trying to get ide-haskell-cabal.builder HOT 1
- Question: Integration with Atom IDE HOT 1
- Do not prettify Literate Haskell HOT 8
- Question : Test output colorized HOT 1
- Language.Haskell.Stylish.Parse.parseModule HOT 2
- Prettifier on Save rewrite of the file erases IDE-Haskell compiler errors HOT 5
- Not finding System.Random HOT 5
- Support for larger project with multiple yaml files HOT 2
- Plugin immediately crashes HOT 4
- Toggle panel usability issue with ide-haskell-repl HOT 3
- List comprehension not colorised HOT 2
- In-editor/gutter messages aren't displayed for standalone files (by neither backend) HOT 5
- Best choice for backend HOT 2
- Opened Atom on a new folder --> "Haskell IDE" gone from the main menu HOT 2
- Atom-Typescript error: Maximum call stack size exceeded HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ide-haskell.