Logs: freenode/#haskell
| 2020-09-22 12:34:24 | × | cheater quits (~user@unaffiliated/cheater) (Remote host closed the connection) |
| 2020-09-22 12:34:30 | <dminuoso> | ohmysomuchuser: There is no global PATH. It's an environment variable. |
| 2020-09-22 12:34:34 | <ohmysomuchuser> | yes, that is me. |
| 2020-09-22 12:34:41 | <dminuoso> | ohmysomuchuser: Let me clarify |
| 2020-09-22 12:34:45 | <maralorn> | siraben: Have you run haskell-language-server-wrapper in the terminal? What does it display? |
| 2020-09-22 12:34:47 | <dminuoso> | ohmysomuchuser: From the *environment* xmonad is started from. |
| 2020-09-22 12:34:51 | <dminuoso> | How is xmonad started? |
| 2020-09-22 12:35:10 | <dminuoso> | Ohh |
| 2020-09-22 12:35:16 | <dminuoso> | ohmysomuchuser: I didnt read carefully, different problem |
| 2020-09-22 12:35:17 | × | darjeeling_ quits (~darjeelin@122.245.219.58) (Ping timeout: 272 seconds) |
| 2020-09-22 12:35:35 | <siraben> | maralorn: http://ix.io/2yo8 |
| 2020-09-22 12:35:35 | <ohmysomuchuser> | by my ~/.xinitrc file, and the command startx. This is after adding ~/.cabal/bin to my $PATH |
| 2020-09-22 12:35:40 | <dminuoso> | ohmysomuchuser: Which version does `cabal --version` return? |
| 2020-09-22 12:35:47 | <siraben> | It's trying to find a Main.hs file, but I'm working on a library |
| 2020-09-22 12:36:05 | <ohmysomuchuser> | 3.2.0.0 |
| 2020-09-22 12:36:11 | → | cheater joins (~user@unaffiliated/cheater) |
| 2020-09-22 12:36:17 | → | flex14 joins (~flex14@2601:280:c780:7ea0:d233:9ddf:c010:c113) |
| 2020-09-22 12:37:00 | <siraben> | cabal repl works fine, but LSP is complaining about libraries it can't find, hm. |
| 2020-09-22 12:37:09 | <dminuoso> | ohmysomuchuser: Mmm, let check the sources of xmonad real quick |
| 2020-09-22 12:38:21 | <dminuoso> | ohmysomuchuser: So personally, I'd recommend using the cabal v2- features. Set the xmonad directory up as a cabal project with a cabal file, set up a build script, which just calls `cabal build`. |
| 2020-09-22 12:38:22 | → | darjeeling_ joins (~darjeelin@122.245.219.58) |
| 2020-09-22 12:39:02 | <ohmysomuchuser> | I can add that `ghci -v ~/.xmonad/xmonad.hs` states the following locations searched: Locations searched: XMonad.hs XMonad.lhs XMonad.hsig XMonad.lhsig |
| 2020-09-22 12:39:18 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 2020-09-22 12:39:19 | <dminuoso> | It's likely that your cabal version was bumped from below 3 to above 3, which now defaults to v2-*. Alternatively you could use v1-install in the above |
| 2020-09-22 12:39:26 | <dminuoso> | The problem is, `cabal install` no longer does what you think it does |
| 2020-09-22 12:39:33 | <siraben> | maralorn: here's the full log https://paste.debian.net/hidden/4429c229/ |
| 2020-09-22 12:39:38 | <maerwald> | shafox: I'm integrating haskell-language-server into ghcup as we speak |
| 2020-09-22 12:39:48 | <dminuoso> | ohmysomuchuser: But really, Id say go with the above. |
| 2020-09-22 12:41:51 | <ohmysomuchuser> | I will give it a try. Thank you. |
| 2020-09-22 12:41:59 | × | bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 260 seconds) |
| 2020-09-22 12:42:31 | <maerwald> | shafox: and then I've an idea for a "ghcup satisfy" command, which would partly be a rip-off of https://github.com/vabal/vabal |
| 2020-09-22 12:43:03 | <maerwald> | I'm not sure if that's what you had in mind, feel free to open a ticket |
| 2020-09-22 12:43:39 | <maralorn> | siraben: Hm, the second log looks fine … |
| 2020-09-22 12:44:01 | <maerwald> | yushyin: can you open a ticket for that (preferably against master) |
| 2020-09-22 12:44:11 | <ohmysomuchuser> | ah, i forgot to add that `ghc-pkg list` lists a lot of things, but not xmonad or xmonad-contrib. `ghc-pkg` recache, does not help. Why is it not "visible"? |
| 2020-09-22 12:44:45 | siraben | uploaded an image: Screen Shot 2020-09-22 at 19.44.29.png (246KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/UlJVsSxbfoTpFFsWCYIFuZbf/Screen Shot 2020-09-22 at 19.44.29.png > |
| 2020-09-22 12:44:48 | <siraben> | maralorn: ^ |
| 2020-09-22 12:44:53 | → | Franciman joins (~francesco@host-82-55-138-222.retail.telecomitalia.it) |
| 2020-09-22 12:45:03 | <dminuoso> | ohmysomuchuser: So roughly, cabal has two modes called old-style and new-style |
| 2020-09-22 12:45:24 | <dminuoso> | ohmysomuchuser: In old-style, you had this notion of the "one global package database", where cabal install would build a package and register it with ghc-pkg |
| 2020-09-22 12:45:55 | <maerwald> | new-style is also global :p |
| 2020-09-22 12:46:01 | → | polyrain joins (~polyrain@2001:8003:e501:6901:d81b:49ea:d8f1:8f81) |
| 2020-09-22 12:46:06 | <dminuoso> | In new-style, which is nix inspired, packages are built into a store, hashed by version, constraints, etc. Then, when cabal selects a plan, it will configure a package database out of that according to the build plan |
| 2020-09-22 12:46:09 | × | amiri quits (~amiri@cpe-76-91-154-9.socal.res.rr.com) (Remote host closed the connection) |
| 2020-09-22 12:46:22 | <dminuoso> | Allowing multiple versions and flavors of a package to coexist |
| 2020-09-22 12:46:58 | <dminuoso> | The fact that we have `cabal install` is a bit funny. We could, for the sake of this discussion, pretend that it doesnt make much sense anymore. |
| 2020-09-22 12:47:06 | × | aaaaaa quits (~ArthurStr@host-91-90-11-13.soborka.net) (Ping timeout: 258 seconds) |
| 2020-09-22 12:48:13 | <tomjaguarpaw> | `cabal install` still makes sense for executables |
| 2020-09-22 12:48:21 | <dminuoso> | You can access these styles by prefixing the commands with v1-/v2- or old-/new-, and if you dont specify a prefix, before 3.0 it would default to old/v1, and after 3.0 it defaults to new/v2 |
| 2020-09-22 12:48:29 | <dminuoso> | Which is why the behavior suddenly changed |
| 2020-09-22 12:48:30 | <ohmysomuchuser> | OK - I'm going to have to look into this much more. I'm not a Haskell developer, just like XMonad very much. Basically, instead of "installing it", I should "build it" as a project, right? |
| 2020-09-22 12:48:51 | <dminuoso> | ohmysomuchuser: I see! If you're not a haskell developer and want your stuff back to normal, use `v1-install` instead of `install` |
| 2020-09-22 12:48:53 | <dminuoso> | and you should be fine |
| 2020-09-22 12:49:13 | × | hhefesto quits (~user@2806:103e:27:514e:97f8:577a:384e:d8df) (Ping timeout: 272 seconds) |
| 2020-09-22 12:49:14 | <tomjaguarpaw> | ohmysomuchuser: This is how I do XMonad (with Cabal new-style) https://github.com/tomjaguarpaw/dotfiles/tree/master/xmonad |
| 2020-09-22 12:49:29 | → | amiri joins (~amiri@cpe-76-91-154-9.socal.res.rr.com) |
| 2020-09-22 12:49:47 | <tomjaguarpaw> | but bear in mind this issue and my hacky workaround: https://github.com/xmonad/xmonad/issues/154 |
| 2020-09-22 12:49:48 | <dminuoso> | Or you use a build file, like tomjaguarpaw has shown you. :) |
| 2020-09-22 12:49:49 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
| 2020-09-22 12:50:19 | <siraben> | maralorn: what's happening with LSP for it not to see the libraries? |
| 2020-09-22 12:50:50 | <dminuoso> | ohmysomuchuser: Just be aware that at some point in the future v1- commands will be dropped from cabal. But this is distant. For xmonad-only users, v1- is perfectly fine to use. :) |
| 2020-09-22 12:50:53 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 2020-09-22 12:51:13 | <ohmysomuchuser> | I have to say, this is disapointingly convoluted :( I only started having problems when xmonad-contrib was removed from the FreeBSD pkg repositories. |
| 2020-09-22 12:51:29 | <maerwald> | dminuoso: do you have a reference to that claim? |
| 2020-09-22 12:51:35 | <maralorn> | siraben: I honestly don‘t know. I have only seen an issue like that once. That was under nixos. |
| 2020-09-22 12:51:49 | <ohmysomuchuser> | So if I don't want to worry about future dropped commands, I can just do what tomjaguarpaw suggested? |
| 2020-09-22 12:52:38 | <maralorn> | siraben: It could have something to do with hls in emacs seeing different env-variables to discover packages. But I don‘t see why that would be the case. |
| 2020-09-22 12:52:40 | → | nbloomf joins (~nbloomf@2600:1700:83e0:1f40:57:4cba:ee0e:cb3a) |
| 2020-09-22 12:52:54 | <dminuoso> | ohmysomuchuser: Yeah. |
| 2020-09-22 12:53:00 | <siraben> | potentially I could correct this by using direnv? |
| 2020-09-22 12:53:23 | <siraben> | In a project that worked before, I had a shell.nix and using emacs-direnv everything worked |
| 2020-09-22 12:53:24 | <dminuoso> | ohmysomuchuser: Im not sure his method is completely correct, but Id be happy to give you a helping hand if you have issues. |
| 2020-09-22 12:53:35 | <siraben> | But since I have to do an override for one of the dependencies, I can't use shell.nix here |
| 2020-09-22 12:53:45 | × | sleblanc quits (~sleblanc@unaffiliated/sebleblanc) (Ping timeout: 240 seconds) |
| 2020-09-22 12:53:49 | <maralorn> | siraben: Wait, have you installed anything in that setup with nix? |
| 2020-09-22 12:54:04 | <dminuoso> | maralorn: cabal sandbox at least gives out deprecation notices, calling v1 style legacy. |
| 2020-09-22 12:54:16 | <siraben> | maralorn: cabal and haskell language server is installed via nix, yeah |
| 2020-09-22 12:54:17 | <dminuoso> | And I recall reading discussions marking v1 commands as deprecated |
| 2020-09-22 12:54:19 | <ohmysomuchuser> | OK - I will attempt it his way, and will come back if need be. Thank you guys. While the tooling is a pain in the neck, you guys are great. |
| 2020-09-22 12:54:29 | <siraben> | But I installed the libraries with cabal |
| 2020-09-22 12:54:38 | <dminuoso> | Perhaps I misremember |
| 2020-09-22 12:54:57 | <dminuoso> | ohmysomuchuser: The tooling is actually pretty good, it's just that xmonad has a bit bizarre installation method. |
| 2020-09-22 12:55:04 | → | nhandler1 joins (~nhandler@193.56.252.210) |
| 2020-09-22 12:55:05 | <maralorn> | siraben: And ghc? |
| 2020-09-22 12:55:09 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit) |
| 2020-09-22 12:55:15 | <siraben> | maralorn: via nix as well |
| 2020-09-22 12:55:36 | <maralorn> | siraben: How old is your nixpkgs/hls? |
| 2020-09-22 12:55:43 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 2020-09-22 12:55:52 | <siraben> | i updated my nix channel roughly 24 hours ago |
| 2020-09-22 12:55:55 | <dminuoso> | ohmysomuchuser: Since xmonad is not configured but *programmed* (think of xmonad as a library that you use to build a window manager with, and some stub executable), you step into the whole "build problem" domain |
| 2020-09-22 12:56:05 | <siraben> | haskell-language-server version: 0.4.0.0 (GHC: 8.8.4) |
| 2020-09-22 12:56:10 | <dminuoso> | build tools are really complicated. :) |
| 2020-09-22 12:56:15 | <siraben> | The Glorious Glasgow Haskell Compilation System, version 8.8.4 |
| 2020-09-22 12:57:41 | → | wavemode joins (~wavemode@097-070-075-143.res.spectrum.com) |
| 2020-09-22 12:57:45 | <maralorn> | siraben: Ugh |
| 2020-09-22 12:58:10 | <maralorn> | Do you execute emacs inside the nix-shell? |
| 2020-09-22 12:58:18 | <siraben> | maralorn: nope |
| 2020-09-22 12:58:26 | <dminuoso> | maerwald: ^- I falsely send a message to someone else: cabal sandbox at least gives out deprecation notices, calling v1 style legacy. And I recall reading discussions marking v1 commands as deprecated |
| 2020-09-22 12:58:27 | <maralorn> | siraben: Can you try that? |
| 2020-09-22 12:58:31 | <siraben> | I usually use direnv for that kinda thing |
All times are in UTC.