atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

ghc-mod crashes repeatedly #199

Closed andrewufrank closed 7 years ago

andrewufrank commented 7 years ago

[Enter steps to reproduce below:]

  1. point to an open buffer for a file (there is an error to report ...)
  2. red crash information window pops up
  3. close with escape
  4. pops up again....

i use ghc. 8.0.2 with stack, the ghc-mod is compiled with same ghc version (stack build ghc-mod and stack install ghc-mod).

this is a show stopper - sorry to say!

andrew

here the log:

Atom Version: 1.13.1 Electron Version: 1.3.13 System: Debian GNU/Linux Thrown From: haskell-ghc-mod package, v1.19.7

Stack Trace

Haskell-ghc-mod: ghc-mod interactive command type failed with error ghc-modi crashed

At caps: {"version":[5,7,0,0],"fileMap":true,"quoteArgs":true,"optparse":true,"typeConstraints":true,"browseParents":true,"interactiveCaseSplit":true,"importedFrom":false}
URI: /home/frank/Workspace8/atomtest/repo8/dove/Data/DoveRDF.hs
Args: -c,--,46,8
message: 
log:
-25.21s: "Trying to run ghc-modi in /home/frank/Workspace8/atomtest/repo8/litText"
-25.21s: "Checking for ghc-modi in /home/frank/Workspace8/atomtest/repo8/litText"
-25.21s: "Found running ghc-modi instance for /home/frank/Workspace8/atomtest/repo8/litText"
-25.209s: "Started interactive action block in /home/frank/Workspace8/atomtest/repo8/litText"
-25.209s: "Running ghc-modi command map-file","/home/frank/Workspace8/atomtest/repo8/litText/LitText/Text4nlp.hs"
-25.209s: "Writing data to stdin..."
-25.207s: "Got response from ghc-modi:\nOK\n"
-25.207s: "Running ghc-modi command type","/home/frank/Workspace8/atomtest/repo8/litText/LitText/Text4nlp.hs","-c","--",43,15
-24.821s: "ghc-modi said: EXCEPTION: types:"
-24.82s: "ghc-modi said:            Not in scope: type constructor or class ‘Triples’"
-24.82s: "ghc-modi said:            Perhaps you meant ‘Triple’ (imported from LitText.Triple)"
-24.82s: "ghc-modi said:            Perhaps you want to add ‘Triples’ to the import list"
-24.82s: "ghc-modi said:            in the import of ‘Data.RDF’"
-24.82s: "ghc-modi said:            (/tmp/ghc-mod32143/Text4nlp336465782861021530.hs:37:1-44)."
-24.82s: "Got response from ghc-modi:\nOK\n"
-24.819s: "Running ghc-modi command unmap-file","/home/frank/Workspace8/atomtest/repo8/litText/LitText/Text4nlp.hs"
-24.819s: "Got response from ghc-modi:\nOK\n"
-24.819s: "Ended interactive action block in /home/frank/Workspace8/atomtest/repo8/litText"
-24.818s: "Trying to run ghc-modi in /home/frank/Workspace8/atomtest/repo8/litText"
-24.818s: "Checking for ghc-modi in /home/frank/Workspace8/atomtest/repo8/litText"
-24.818s: "Found running ghc-modi instance for /home/frank/Workspace8/atomtest/repo8/litText"
-24.818s: "Started interactive action block in /home/frank/Workspace8/atomtest/repo8/litText"
-24.818s: "Running ghc-modi command map-file","/home/frank/Workspace8/atomtest/repo8/litText/LitText/Text4nlp.hs"
-24.818s: "Writing data to stdin..."
-24.817s: "Got response from ghc-modi:\nOK\n"
-24.817s: "Running ghc-modi command info","/home/frank/Workspace8/atomtest/repo8/litText/LitText/Text4nlp.hs","--","a"
-24.418s: "ghc-modi said: EXCEPTION: info:     Not in scope: ‘a’"
-24.417s: "Got response from ghc-modi:\nCannot show info\nOK\n"
-24.417s: "Running ghc-modi command unmap-file","/home/frank/Workspace8/atomtest/repo8/litText/LitText/Text4nlp.hs"
-24.416s: "Got response from ghc-modi:\nOK\n"
-24.416s: "Ended interactive action block in /home/frank/Workspace8/atomtest/repo8/litText"
-0.225s: "Trying to run ghc-modi in /home/frank/Workspace8/atomtest/repo8/dove"
-0.225s: "Checking for ghc-modi in /home/frank/Workspace8/atomtest/repo8/dove"
-0.225s: "Spawning new ghc-modi instance for /home/frank/Workspace8/atomtest/repo8/dove with",{"cwd":"/home/frank/Workspace8/atomtest/repo8/dove","env":{"ATOM_HOME":"/home/frank/.atom","NODE_PATH":"/usr/share/atom/resources/app.asar/exports","NODE_ENV":"production","LS_COLORS":"","XDG_MENU_PREFIX":"xfce-","LANG":"en_US.utf8","DISPLAY":":0.0","XDG_VTNR":"7","SSH_AUTH_SOCK":"/tmp/ssh-ftV7uTtJKboV/agent.1663","CLASSPATH":"pikes-tintop-1.0-SNAPSHOT-jar-with-dependencies.jar:Semafor-3.0-alpha-04.jar:models/stanford-corenlp-3.5.2-models.jar","GLADE_CATALOG_PATH":":","XDG_SESSION_ID":"4","XDG_GREETER_DATA_DIR":"/var/lib/lightdm/data/frank","USER":"frank","GLADE_MODULE_PATH":":","DESKTOP_SESSION":"lightdm-xsession","PWD":"/home/frank","HOME":"/home/frank","SSH_AGENT_PID":"1704","QT_ACCESSIBILITY":"1","XDG_SESSION_TYPE":"x11","XDG_DATA_DIRS":"/usr/share/xfce4:/usr/local/share/:/usr/share/:/usr/share","XDG_SESSION_DESKTOP":"lightdm-xsession","GLADE_PIXMAP_PATH":":","DESKTOP_STARTUP_ID":"wrapper-1.0/|usr|share|atom|atom/1768-7-santafe_TIME16739029","GTK_MODULES":"gail:atk-bridge","SHELL":"/bin/bash","XDG_SEAT_PATH":"/org/freedesktop/DisplayManager/Seat0","XDG_CURRENT_DESKTOP":"XFCE","QT_LINUX_ACCESSIBILITY_ALWAYS_ON":"1","SHLVL":"1","XDG_SEAT":"seat0","LANGUAGE":"en_US:en","GDMSESSION":"lightdm-xsession","LOGNAME":"frank","DBUS_SESSION_BUS_ADDRESS":"unix:path=/run/user/1010/bus","XDG_RUNTIME_DIR":"/run/user/1010","XAUTHORITY":"/home/frank/.Xauthority","XDG_SESSION_PATH":"/org/freedesktop/DisplayManager/Session0","XDG_CONFIG_DIRS":"/etc/xdg","GOOGLE_API_KEY":"AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q","PATH":"/home/frank/Workspace8/atomtest/repo8/.stack-work/install/x86_64-linux-nopie/lts-8.1/8.0.2/bin:/home/frank/.stack/snapshots/x86_64-linux-nopie/lts-8.1/8.0.2/bin:/home/frank/.stack/programs/x86_64-linux/ghc-nopie-8.0.2/bin:/home/frank/.local/bin:/home/frank/.local/bin/:/home/frank/ghc-mod-sandbox/bin/:/home/frank/.cabal/bin:/home/frank/Debinstall83/deb9/amd9.bin:/home/frank/.bin:/home/frank/.bin/corenlp:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games","SESSION_MANAGER":"local/santafe:@/tmp/.ICE-unix/1714,unix/santafe:/tmp/.ICE-unix/1714","_":"/usr/bin/env"},"encoding":"utf-8","maxBuffer":null}
-0.225s: "Spawning new ghc-modi instance for /home/frank/Workspace8/atomtest/repo8/dove with options = ",{"cwd":"/home/frank/Workspace8/atomtest/repo8/dove","env":{"ATOM_HOME":"/home/frank/.atom","NODE_PATH":"/usr/share/atom/resources/app.asar/exports","NODE_ENV":"production","LS_COLORS":"","XDG_MENU_PREFIX":"xfce-","LANG":"en_US.utf8","DISPLAY":":0.0","XDG_VTNR":"7","SSH_AUTH_SOCK":"/tmp/ssh-ftV7uTtJKboV/agent.1663","CLASSPATH":"pikes-tintop-1.0-SNAPSHOT-jar-with-dependencies.jar:Semafor-3.0-alpha-04.jar:models/stanford-corenlp-3.5.2-models.jar","GLADE_CATALOG_PATH":":","XDG_SESSION_ID":"4","XDG_GREETER_DATA_DIR":"/var/lib/lightdm/data/frank","USER":"frank","GLADE_MODULE_PATH":":","DESKTOP_SESSION":"lightdm-xsession","PWD":"/home/frank","HOME":"/home/frank","SSH_AGENT_PID":"1704","QT_ACCESSIBILITY":"1","XDG_SESSION_TYPE":"x11","XDG_DATA_DIRS":"/usr/share/xfce4:/usr/local/share/:/usr/share/:/usr/share","XDG_SESSION_DESKTOP":"lightdm-xsession","GLADE_PIXMAP_PATH":":","DESKTOP_STARTUP_ID":"wrapper-1.0/|usr|share|atom|atom/1768-7-santafe_TIME16739029","GTK_MODULES":"gail:atk-bridge","SHELL":"/bin/bash","XDG_SEAT_PATH":"/org/freedesktop/DisplayManager/Seat0","XDG_CURRENT_DESKTOP":"XFCE","QT_LINUX_ACCESSIBILITY_ALWAYS_ON":"1","SHLVL":"1","XDG_SEAT":"seat0","LANGUAGE":"en_US:en","GDMSESSION":"lightdm-xsession","LOGNAME":"frank","DBUS_SESSION_BUS_ADDRESS":"unix:path=/run/user/1010/bus","XDG_RUNTIME_DIR":"/run/user/1010","XAUTHORITY":"/home/frank/.Xauthority","XDG_SESSION_PATH":"/org/freedesktop/DisplayManager/Session0","XDG_CONFIG_DIRS":"/etc/xdg","GOOGLE_API_KEY":"AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q","PATH":"/home/frank/Workspace8/atomtest/repo8/.stack-work/install/x86_64-linux-nopie/lts-8.1/8.0.2/bin:/home/frank/.stack/snapshots/x86_64-linux-nopie/lts-8.1/8.0.2/bin:/home/frank/.stack/programs/x86_64-linux/ghc-nopie-8.0.2/bin:/home/frank/.local/bin:/home/frank/.local/bin/:/home/frank/ghc-mod-sandbox/bin/:/home/frank/.cabal/bin:/home/frank/Debinstall83/deb9/amd9.bin:/home/frank/.bin:/home/frank/.bin/corenlp:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games","SESSION_MANAGER":"local/santafe:@/tmp/.ICE-unix/1714,unix/santafe:/tmp/.ICE-unix/1714","_":"/usr/bin/env"},"encoding":"utf-8","maxBuffer":null}
-0.211s: "Started interactive action block in /home/frank/Workspace8/atomtest/repo8/dove"
-0.211s: "Running ghc-modi command type","/home/frank/Workspace8/atomtest/repo8/dove/Data/DoveRDF.hs","-c","--",46,8
-0.01s: "ghc-modi said: Error parsing targets: No local directories found as children of ."
-0.008s: "ghc-modi said: ghc-mod: readCreateProcess: stack \"build\" \"--only-dependencies\" \".\" (exit 1): failed"
-0.001s: "ghc-modi for /home/frank/Workspace8/atomtest/repo8/dove ended with 1"
-0.001s: "ghc-modi for /home/frank/Workspace8/atomtest/repo8/dove ended with 1"
0s: "Running ghc-modi command unmap-file","/home/frank/Workspace8/atomtest/repo8/dove/Data/DoveRDF.hs"
0s: {"name":"ghc-modi crashed"}

ghc-modi crashed
    at mkError (/home/frank/.atom/packages/haskell-ghc-mod/lib/util.coffee:228:15)
    at ChildProcess.exitCallback (/home/frank/.atom/packages/haskell-ghc-mod/lib/ghc-mod/interactive-process.coffee:78:20)
    at emitTwo (events.js:111:20)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

Commands

     -1:04.1.0 core:save (input.hidden-input)
     -1:04.0 ide-haskell:prettify-file (atom-text-editor.editor.is-focused)
     -0:48 core:copy (input.hidden-input)
     -0:45.7.0 core:paste (input.hidden-input)
  3x -0:19.3.0 core:backspace (input.hidden-input)

Config

{
  "core": {
    "automaticallyUpdate": false,
    "closeEmptyWindows": false,
    "destroyEmptyPanes": false,
    "packagesWithKeymapsDisabled": [],
    "projectHome": "ssh://ascona/stFolder/AF/ServerOnly/repo8.git",
    "telemetryConsent": "no",
    "themes": [
      "atom-light-ui",
      "atom-light-syntax"
    ]
  },
  "haskell-ghc-mod": {
    "additionalPathDirectories": [
      "/home/frank/.local/bin"
    ],
    "ghcModPath": "/home/frank/.local/bin/ghc-mod",
    "onSaveLint": false
  }
}

Installed Packages

# User
autocomplete-haskell, v0.7.2 (active)
git-plus, v7.3.2 (active)
haskell-ghc-mod, v1.19.7 (active)
ide-haskell, v1.9.3 (active)
ide-haskell-cabal, v1.7.5 (active)
language-haskell, v1.12.1 (active)
atom-dark-syntax, v0.28.0 (inactive)
atom-dark-ui, v0.53.0 (inactive)
atom-light-syntax, v0.29.0 (active)
atom-light-ui, v0.46.0 (active)
base16-tomorrow-dark-theme, v1.4.0 (inactive)
base16-tomorrow-light-theme, v1.4.0 (inactive)
one-dark-ui, v1.8.2 (inactive)
one-light-ui, v1.8.2 (inactive)
one-dark-syntax, v1.6.0 (inactive)
one-light-syntax, v1.6.0 (inactive)
solarized-dark-syntax, v1.1.1 (inactive)
solarized-light-syntax, v1.1.1 (inactive)
about, v1.7.2 (active)
archive-view, v0.62.0 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.14.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.33.1 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.29.0 (inactive)
autosave, v0.23.2 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.43.2 (active)
bracket-matcher, v0.85.1 (active)
command-palette, v0.39.1 (inactive)
deprecation-cop, v0.55.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.40.0 (active)
find-and-replace, v0.204.5 (inactive)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.2.0 (active)
go-to-line, v0.31.2 (inactive)
grammar-selector, v0.48.2 (active)
image-view, v0.60.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.1 (active)
link, v0.31.2 (inactive)
markdown-preview, v0.159.3 (active)
metrics, v1.1.3 (active)
notifications, v0.65.1 (active)
open-on-github, v1.2.1 (inactive)
package-generator, v1.0.2 (inactive)
settings-view, v0.244.0 (active)
snippets, v1.0.4 (active)
spell-check, v0.68.5 (active)
status-bar, v1.6.0 (active)
styleguide, v0.48.0 (active)
symbols-view, v0.113.1 (inactive)
tabs, v0.103.1 (active)
timecop, v0.33.2 (active)
tree-view, v0.211.1 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (active)
whitespace, v0.35.0 (active)
wrap-guide, v0.39.0 (active)
language-c, v0.54.0 (active)
language-clojure, v0.22.1 (active)
language-coffee-script, v0.48.1 (active)
language-csharp, v0.13.0 (active)
language-css, v0.40.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.43.0 (active)
language-html, v0.47.1 (active)
language-hyperlink, v0.16.1 (active)
language-java, v0.24.0 (active)
language-javascript, v0.122.0 (active)
language-json, v0.18.3 (active)
language-less, v0.29.6 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.37.0 (active)
language-php, v0.37.3 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.1 (active)
language-ruby, v0.70.2 (active)
language-ruby-on-rails, v0.25.1 (active)
language-sass, v0.57.0 (active)
language-shellscript, v0.23.0 (active)
language-source, v0.9.0 (active)
language-sql, v0.25.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.29.1 (active)
language-toml, v0.18.1 (active)
language-xml, v0.34.12 (active)
language-yaml, v0.27.1 (active)

# Dev
No dev packages
lierdakil commented 7 years ago

This is the actual error:

-0.01s: "ghc-modi said: Error parsing targets: No local directories found as children of ."

Basically, ghc-mod crashes.

Honestly, I have no idea why. Running ghc-mod "/home/frank/Workspace8/atomtest/repo8/dove/Data/DoveRDF.hs -c 46 8 manually might give more information. Make sure current working directory is /home/frank/Workspace8/atomtest/repo8/dove.

Sorry I can't me of more immediate help.

andrewufrank commented 7 years ago

thank you for your immediate reaction. it should not touch the dove directory, the stack.yaml is later.

for the command ghc-mod "/home/frank/Workspace8/atomtest/repo8/dove/Data/DoveRDF.hs" -c -- 46 8 i get "invalid option -c. can you tell me what the command should look excatly - i cannot see a -c option?

flags: {}
extra-package-dbs: []
packages:
- '.'
- litText
- litNLP
- rdf4store
- rdfhextension
- uniform/uniform-algebras/
- uniform/uniform-convenience/
- uniform/uniform-error/
- uniform/uniform-fileio/
- uniform/uniform-strings/
- uniform/uniform-time/
extra-deps:
- chatter-0.8.0.1
- data-easy-0.7.0
- fullstop-0.1.4
- hgal-2.0.0.2
- non-negative-0.1.1
- numeric-prelude-0.4.2
- posix-paths-0.2.1.1
- rdf4h-3.0.1
- test-invariant-0.4.5.0
- tokenize-0.3.0
resolver: lts-8.1
lierdakil commented 7 years ago

Oh, sorry, I forgot type. So the command should actually be ghc-mod type "/home/frank/Workspace8/atomtest/repo8/dove/Data/DoveRDF.hs" -c -- 46 8

andrewufrank commented 7 years ago

frank@santafe:~/Workspace8/atomtest/repo8/dove$ ghc-mod type "/home/frank/Workspace8/atomtest/repo8/dove/Data/DoveRDF.hs" -c -- 46 8 the reply then is

Error parsing targets: No local directories found as children of .
EXCEPTION: types:
           readCreateProcess: stack "build" "--only-dependencies" "." (exit 1): failed

line 46 of DoveRDF.hs is import Safe

i do not see why it is interested in safe and i seem not to have changed this line (but it was in a project-wide search).

the stack.yaml (in home/frank/Workspace/atomtest/repo8) you have above. i guess the point is that there is no entry for dove because i do not work on this right now. stack build on this directory gives the error message that ghc-mod is reporting, but stack build on the directory above does not enter the dove directory. i sense there might be a broad direction to work on all subdirectories (some *) and not only on those in the stack.yaml.

thank you for your effort!

lierdakil commented 7 years ago

Well, there is a change in ghc-mod master that removes this particular call to stack build unless explicitly requested, but ghc-mod still needs to at least be able to configure the project, and in the absence of stack.yaml that could be tricky. But if you're not working on dove, I wonder why it tries to read an expression type? Do you just happen to have DoveRDF open?

andrewufrank commented 7 years ago

i will check your suggestion next time i see this error. thank you for the help.

andrewufrank commented 7 years ago

same setup, but i guess a different type of crash - therefore moved to #201

lierdakil commented 7 years ago

Okay, so this is trickier. Basically, ghc-mod can't find littext that your project uses. There could be a lot of reasons for that, but maybe that's just a problem with package-db paths (which we should probably fix on ghc-mod side of things, but it can get rather tricky, see https://github.com/DanielG/ghc-mod/issues/787). Could you post output of stack path run in /home/frank/Workspace8/atomtest/repo8/litNLP and the directory where superproject stack.yaml is located (I'm assuming /home/frank/Workspace8/atomtest/repo8)? Thanks. And sorry you're running into these issues.

andrewufrank commented 7 years ago

same setup, but i guess a different type of crash: moved to #201

andrewufrank commented 7 years ago

here the stack path that you asked for - regarding the first issue. do you think the second issue (comment above) is related or separate? if separate, delete or move to a new issue, please.

i wonder if i should add the solution form https://github.com/DanielG/ghc-mod/issues/787 ad. i think i can do this, if you believe that it would help (or clarify the issue)

in the root:

frank@santafe:~/Workspace8/atomtest/repo8$ stack path
stack-root: /home/frank/.stack
project-root: /home/frank/Workspace8/atomtest/repo8
config-location: /home/frank/Workspace8/atomtest/repo8/stack.yaml
bin-path: /home/frank/.stack/snapshots/x86_64-linux-nopie/lts-8.1/8.0.2/bin:/home/frank/.stack/programs/x86_64-linux/ghc-nopie-8.0.2/bin:/home/frank/.local/bin:/home/frank/.local/bin/:/home/frank/ghc-mod-sandbox/bin/:/home/frank/.cabal/bin:/home/frank/Debinstall83/deb9/amd9.bin:/home/frank/.bin:/home/frank/.bin/corenlp:/home/frank/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
programs: /home/frank/.stack/programs/x86_64-linux
compiler-exe: /home/frank/.stack/programs/x86_64-linux/ghc-nopie-8.0.2/bin/ghc
compiler-bin: /home/frank/.stack/programs/x86_64-linux/ghc-nopie-8.0.2/bin
local-bin: /home/frank/.local/bin
extra-include-dirs: 
extra-library-dirs: 
snapshot-pkg-db: /home/frank/.stack/snapshots/x86_64-linux-nopie/lts-8.1/8.0.2/pkgdb
local-pkg-db: /home/frank/Workspace8/atomtest/repo8/.stack-work/install/x86_64-linux-nopie/lts-8.1/8.0.2/pkgdb
global-pkg-db: /home/frank/.stack/programs/x86_64-linux/ghc-nopie-8.0.2/lib/ghc-8.0.2/package.conf.d
ghc-package-path: /home/frank/Workspace8/atomtest/repo8/.stack-work/install/x86_64-linux-nopie/lts-8.1/8.0.2/pkgdb:/home/frank/.stack/snapshots/x86_64-linux-nopie/lts-8.1/8.0.2/pkgdb:/home/frank/.stack/programs/x86_64-linux/ghc-nopie-8.0.2/lib/ghc-8.0.2/package.conf.d
snapshot-install-root: /home/frank/.stack/snapshots/x86_64-linux-nopie/lts-8.1/8.0.2
local-install-root: /home/frank/Workspace8/atomtest/repo8/.stack-work/install/x86_64-linux-nopie/lts-8.1/8.0.2
snapshot-doc-root: /home/frank/.stack/snapshots/x86_64-linux-nopie/lts-8.1/8.0.2/doc
local-doc-root: /home/frank/Workspace8/atomtest/repo8/.stack-work/install/x86_64-linux-nopie/lts-8.1/8.0.2/doc
dist-dir: .stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0
local-hpc-root: /home/frank/Workspace8/atomtest/repo8/.stack-work/install/x86_64-linux-nopie/lts-8.1/8.0.2/hpc
local-bin-path: /home/frank/.local/bin
ghc-paths: /home/frank/.stack/programs/x86_64-linux

and in litNLP

frank@santafe:~/Workspace8/atomtest/repo8/litNLP$ stack path
stack-root: /home/frank/.stack
project-root: /home/frank/Workspace8/atomtest/repo8
config-location: /home/frank/Workspace8/atomtest/repo8/stack.yaml
bin-path: /home/frank/.stack/snapshots/x86_64-linux-nopie/lts-8.1/8.0.2/bin:/home/frank/.stack/programs/x86_64-linux/ghc-nopie-8.0.2/bin:/home/frank/.local/bin:/home/frank/.local/bin/:/home/frank/ghc-mod-sandbox/bin/:/home/frank/.cabal/bin:/home/frank/Debinstall83/deb9/amd9.bin:/home/frank/.bin:/home/frank/.bin/corenlp:/home/frank/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
programs: /home/frank/.stack/programs/x86_64-linux
compiler-exe: /home/frank/.stack/programs/x86_64-linux/ghc-nopie-8.0.2/bin/ghc
compiler-bin: /home/frank/.stack/programs/x86_64-linux/ghc-nopie-8.0.2/bin
local-bin: /home/frank/.local/bin
extra-include-dirs: 
extra-library-dirs: 
snapshot-pkg-db: /home/frank/.stack/snapshots/x86_64-linux-nopie/lts-8.1/8.0.2/pkgdb
local-pkg-db: /home/frank/Workspace8/atomtest/repo8/.stack-work/install/x86_64-linux-nopie/lts-8.1/8.0.2/pkgdb
global-pkg-db: /home/frank/.stack/programs/x86_64-linux/ghc-nopie-8.0.2/lib/ghc-8.0.2/package.conf.d
ghc-package-path: /home/frank/Workspace8/atomtest/repo8/.stack-work/install/x86_64-linux-nopie/lts-8.1/8.0.2/pkgdb:/home/frank/.stack/snapshots/x86_64-linux-nopie/lts-8.1/8.0.2/pkgdb:/home/frank/.stack/programs/x86_64-linux/ghc-nopie-8.0.2/lib/ghc-8.0.2/package.conf.d
snapshot-install-root: /home/frank/.stack/snapshots/x86_64-linux-nopie/lts-8.1/8.0.2
local-install-root: /home/frank/Workspace8/atomtest/repo8/.stack-work/install/x86_64-linux-nopie/lts-8.1/8.0.2
snapshot-doc-root: /home/frank/.stack/snapshots/x86_64-linux-nopie/lts-8.1/8.0.2/doc
local-doc-root: /home/frank/Workspace8/atomtest/repo8/.stack-work/install/x86_64-linux-nopie/lts-8.1/8.0.2/doc
dist-dir: .stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0
local-hpc-root: /home/frank/Workspace8/atomtest/repo8/.stack-work/install/x86_64-linux-nopie/lts-8.1/8.0.2/hpc
local-bin-path: /home/frank/.local/bin
ghc-paths: /home/frank/.stack/programs/x86_64-linux

i hope this is helpful.

lierdakil commented 7 years ago

Strangely enough, everything seems to be in order...

So here's an idea...

  1. Close Atom.
  2. Remove .stack-work from sub-projects (litText, litNLP in particular)
  3. Run stack build in superproject (/home/frank/Workspace8/atomtest/repo8)
  4. Run stack build ghc-mod in superproject (no need for stack install btw)
  5. Run Atom in super- or sub-project.
lierdakil commented 7 years ago

I've tried with a simple a-b project (i.e. superproject references projects a and b, where b depends on a, no stack.yaml in sub-projects), and everything seems to work... If your project is opensource and available from github or something similar, I might test with it directly. If not, don't worry about it.

Also, for good measure, run stack exec ghc-mod debug in litNLP and litText and post output here, maybe I'm missing something.

lierdakil commented 7 years ago

As for the relevance to the first issue... Well, frankly, first one is a non-issue honestly. Ghc-mod is not supposed to work when stack can't configure the project, and from what I understood, the project that threw an error is "disabled". So... yeah. Big scary red box just basically says "hey, ghc-mod can't handle this". The second issue is different in this regard, as it should work, but for some obscure reason does not, and it's not related in any shape or form to the first one. Since github doesn't provide means for splitting issues, I'm just going to leave this as it is.

andrewufrank commented 7 years ago

i followed you advice to delete all .stack-work (except in superproject) (and i have included the missing dove directory in stack.yaml - which is not recompiled, so no time lost). it works. Again, thank you for your patience!

nevertheless, i think if a subdirectory is not in the stack.yaml, then it should be ignored by ghc-mod.

ps. i also tried to split the issues, but i am not certain i did this right and perhaps confused the whole, so i close this discusion. feel free to close #201 and i will reopen, when i have a new case.

lierdakil commented 7 years ago

nevertheless, i think if a subdirectory is not in the stack.yaml, then it should be ignored by ghc-mod.

Problem is, stack doesn't report if a given project is not in stack.yaml. So only way to know is try to configure it and see if it fails. But it can fail for a huge number of other reasons. So... you know, we've opted for an obvious solution of "tell the user something went wrong". Better error messages should alleviate the problem somewhat, but that's pretty low on the priority list and let's say, it's trickier than it should be. I've toyed with the idea of improving ghc-mod's API to make this kind of thing easier, but it's pretty much in its infancy, and there are a lot of more pressing issues at the moment.