Coder Social home page Coder Social logo

Comments (4)

mb2a-sgn avatar mb2a-sgn commented on September 2, 2024 1

Thank you for your cooperation.

Indeed, the HLS version 2.4.0 was outdated. After updating GHC to 9.4.8 and HLS to 2.9.00, the problem is not reproduced in my environment.
my-lib.tar.gz

The problem seems to be probabilistic so it's not easy, but I think we can close this issue until the problem occurs again.

from haskell-language-server.

fendor avatar fendor commented on September 2, 2024 1

Thanks for checking!

Ok, then let's close this and feel free to reopen or open a new issue if you run into any problems :)

from haskell-language-server.

fendor avatar fendor commented on September 2, 2024

Hi, thank you for bug report and the detailed instructions!

HLS's support for build-type: Custom is generally speaking not great. So, I am not surprised there are a couple of sharp edges.

I can not reproduce exactly the same error, though, on the first run, I am getting:

  Failed to run ["cabal","v2-repl","/home/hugin/Downloads/my-lib/test/Spec.hs"] in directory
  "/home/hugin/Downloads/my-lib". Consult the logs for full command and error.
  Failed command: cabal
  --builddir=/home/hugin/.cache/hie-bios/dist-my-lib-52c1f96b1804b573257fc6cf0e1e0dc2 v2-repl
  --with-compiler /home/hugin/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 --with-hc-pkg
  /home/hugin/.cache/hie-bios/ghc-pkg-99f55999495b863a61d4f15d989eaab4
  /home/hugin/Downloads/my-lib/test/Spec.hs
  Build profile: -w ghc-9.6.5 -O1
  In order, the following will be built (use -v for more details):
  - cabal-doctest-1.0.10 (lib) (requires build)
  - ghc-paths-0.1.0.12 (lib:ghc-paths) (requires build)
  - doctest-0.22.4 (lib) (requires download & build)
  - my-lib-0.1.1.0 (interactive) (first run)
  Downloading doctest-0.22.4
  Starting ghc-paths-0.1.0.12 (all, legacy fallback: build-type is Custom)
  Starting cabal-doctest-1.0.10 (lib)
  Downloaded doctest-0.22.4
  Building cabal-doctest-1.0.10 (lib)
  Installing cabal-doctest-1.0.10 (lib)
  Completed cabal-doctest-1.0.10 (lib)
  Building ghc-paths-0.1.0.12 (all, legacy fallback: build-type is Custom)
  Installing ghc-paths-0.1.0.12 (all, legacy fallback: build-type is Custom)
  Completed ghc-paths-0.1.0.12 (all, legacy fallback: build-type is Custom)
  Starting doctest-0.22.4 (lib)
  Building doctest-0.22.4 (lib)
  Installing doctest-0.22.4 (lib)
  Completed doctest-0.22.4 (lib)
  [1 of 2] Compiling Main (
  /home/hugin/.cache/hie-bios/dist-my-lib-52c1f96b1804b573257fc6cf0e1e0dc2/build/x86_64-linux/ghc-9.6.5/my-lib-0.1.1.0/setup/setup.hs,
  /home/hugin/.cache/hie-bios/dist-my-lib-52c1f96b1804b573257fc6cf0e1e0dc2/build/x86_64-linux/ghc-9.6.5/my-lib-0.1.1.0/setup/Main.o
  ) [Distribution.Extra.Doctest package changed]
  [2 of 2] Linking
  /home/hugin/.cache/hie-bios/dist-my-lib-52c1f96b1804b573257fc6cf0e1e0dc2/build/x86_64-linux/ghc-9.6.5/my-lib-0.1.1.0/setup/setup
  [Objects changed]
  Configuring my-lib-0.1.1.0...
  [1 of 2] Compiling Main (
  /home/hugin/.cache/hie-bios/dist-my-lib-52c1f96b1804b573257fc6cf0e1e0dc2/build/x86_64-linux/ghc-9.6.5/my-lib-0.1.1.0/setup/setup.hs,
  /home/hugin/.cache/hie-bios/dist-my-lib-52c1f96b1804b573257fc6cf0e1e0dc2/build/x86_64-linux/ghc-9.6.5/my-lib-0.1.1.0/setup/Main.o
  ) [Distribution.Extra.Doctest package changed]
  [2 of 2] Linking
  /home/hugin/.cache/hie-bios/dist-my-lib-52c1f96b1804b573257fc6cf0e1e0dc2/build/x86_64-linux/ghc-9.6.5/my-lib-0.1.1.0/setup/setup
  [Objects changed]

  Saved package config file is outdated:
  • the Cabal version changed from Cabal-3.12.1.0 to Cabal-3.10.3.0
  Re-run the 'configure' command.
  Error: [Cabal-7125]
  repl failed for my-lib-0.1.1.0.

And after I ran cabal build all --enable-testing once, it started working altogether, and I can't get it to fail again 🤔. However, it is really slow to load the project.

Full disclosure, I am not running the nix flake as I didn't really need it.

from haskell-language-server.

fendor avatar fendor commented on September 2, 2024

Perhaps fixed on a more recent HLS version? Could you try to reproduce on a more recent GHC version that has proper multi home unit support and more recent HLS version?

from haskell-language-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.