Skip to content

Conversation

@Avi-D-coder
Copy link
Collaborator

@Avi-D-coder Avi-D-coder commented Nov 10, 2021

Fix: Avi-D-coder/implicit-hie#42
@fendor does Avi-D-coder/implicit-hie-cradle@edc3420 look like it solves the problem?

Needs nix flake update before merging.

@Avi-D-coder Avi-D-coder requested a review from fendor November 10, 2021 20:06
@fendor
Copy link
Collaborator

fendor commented Nov 11, 2021

Idea looks good, I noticed the PR a bit too late and have some comments on: Avi-D-coder/implicit-hie-cradle@edc3420

@Avi-D-coder
Copy link
Collaborator Author

@fendor I addressed your review. Good catch!

@Avi-D-coder
Copy link
Collaborator Author

@fendor can you take a look at Testing / test (8.10.7, ubuntu-latest) (pull_request). Is cabal repl failing?

@fendor
Copy link
Collaborator

fendor commented Nov 11, 2021

Hm, the test fail looks weird to me:

Got unexpected diagnostics for Uri {getUri = "file:///tmp/extra-dir-16848491138556/RecordDot.hs"} got List [Diagnostic {_range = Range {_start = Position {_line = 0, _character = 0}, _end = Position {_line = 1, _character = 0}}, _severity = Just DsError, _code = Nothing, _source = Just "compiler", _message = "cabal: streamingProcess: chdir: invalid argument (Bad file descriptor)", _tags = Nothing, _relatedInformation = Nothing}] 

Not sure what is going on.

@jneira
Copy link
Member

jneira commented Nov 17, 2021

@Avi-D-coder thanks for contributing again here 😄 do you think would be time to mark it as ready for review?

@Avi-D-coder Avi-D-coder marked this pull request as ready for review November 17, 2021 21:35
@Avi-D-coder
Copy link
Collaborator Author

let's see if this round of tests pass.
Maybe it was just a fluke error.

@jneira
Copy link
Member

jneira commented Nov 18, 2021

hmm not sure if the test fail belongs to the flaky ones:

 FAIL (0.63s) test/exe/Main.hs:5496: Got unexpected diagnostics for Uri {getUri = "file:///tmp/extra-dir-53701638320214/dirB/Foo.hs"} got List [Diagnostic {_range = Range {_start = Position {_line = 0, _character = 0}, _end = Position {_line = 1, _character = 0}}, _severity = Just DsError, _code = Nothing, _source = Just "compiler", _message = "cabal: streamingProcess: chdir: invalid argument (Bad file descriptor)", _tags = Nothing, _relatedInformation = Nothing}] Use -p '/use rootUri/' to rerun this test only. 

does it passes locally?

@Avi-D-coder
Copy link
Collaborator Author

nix build works, but I get this from nix develop

❯ nix develop --print-build-logs --command cabal update cabal2nix-hls-rename-plugin> installing cabal2nix-hls-test-utils> installing cabal2nix-shake-bench> installing myst-parser> trying https://files.pythonhosted.org/packages/source/m/myst-parser/myst-parser-0.15.1.tar.gz github> setupCompilerEnvironmentPhase myst-parser> % Total % Received % Xferd Average Speed Time Time Time Current github> Build with /nix/store/m0xw42nwrlfznfasiqfzwdavi4421x32-ghc-8.10.7. myst-parser> Dload Upload Total Spent Left Speed source> trying https://github.com/readthedocs/sphinx_rtd_theme/archive/34f81daaf52466366c80003db293d50075c1b896.tar.gz source> % Total % Received % Xferd Average Speed Time Time Time Current source> Dload Upload Total Spent Left Speed source> 100 170 100 170 0 0 495 0 --:--:-- --:--:-- --:--:-- 495 myst-parser> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 github> unpacking sources github> unpacking source archive /nix/store/imx36w92rwaxnlb5299nw98bfgz9wlbh-github-0.27.tar.gz github> source root is github-0.27 github> setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file github-0.27/src/GitHub/Request.hs github> patching sources github> applying patch /nix/store/pgl2rm264f5s2pg1cxid5immb3yp0f5i-514b175851dd7c4a9722ff203dd6f652a15d33e8.patch github> patching file github.cabal github> Hunk #1 FAILED at 178. github> 1 out of 1 hunk FAILED -- saving rejects to file github.cabal.rej github> patching file src/GitHub/Request.hs github> Reversed (or previously applied) patch detected! Assume -R? [n] github> Apply anyway? [n] github> Skipping patch. github> 2 out of 2 hunks ignored -- saving rejects to file src/GitHub/Request.hs.rej error: builder for '/nix/store/4k1i98049sk7zii17vrsgrzprny5yds0-github-0.27.drv' failed with exit code 1; last 10 log lines: > patching sources > applying patch /nix/store/pgl2rm264f5s2pg1cxid5immb3yp0f5i-514b175851dd7c4a9722ff203dd6f652a15d33e8.patch > patching file github.cabal > Hunk #1 FAILED at 178. > 1 out of 1 hunk FAILED -- saving rejects to file github.cabal.rej > patching file src/GitHub/Request.hs > Reversed (or previously applied) patch detected! Assume -R? [n] > Apply anyway? [n] > Skipping patch. > 2 out of 2 hunks ignored -- saving rejects to file src/GitHub/Request.hs.rej For full logs, run 'nix log /nix/store/4k1i98049sk7zii17vrsgrzprny5yds0-github-0.27.drv'. error: 1 dependencies of derivation '/nix/store/27wv7z2z30l68aqgmzasfwmr1h28mn8p-ghc-8.10.7-with-packages.drv' failed to build error: 1 dependencies of derivation '/nix/store/l8kibyqm7p6wsdp8gfwraka9zqppqf81-gen-hls-changelogs.drv' failed to build error: 1 dependencies of derivation '/nix/store/z3n7lkwwvggvf933cbhnmwvxgrhs27pa-ghc-shell-for-packages-0-env.drv' failed to build 
@Avi-D-coder
Copy link
Collaborator Author

Nix is good now, but that one test keeps failing. I have no idea why.
https://github.com/haskell/haskell-language-server/runs/4252161650?check_suite_focus=true

@Avi-D-coder
Copy link
Collaborator Author

Avi-D-coder commented Nov 23, 2021

@fendor how would you feel about changing it to don't generate a cradle based on .cabal file if cabal version >= 3.4 && ghc >= 9?
I'm not really clear what is wrong with 8.10.7, but we can at least use cabal repl for ghc 9.

@fendor
Copy link
Collaborator

fendor commented Nov 23, 2021

As far as I can tell, no tests of GHC >= 9 have been run yet, only the build jobs. This is probably a somewhat real regression that we ought to look into. I'll try to take a look in the next days.

@fendor
Copy link
Collaborator

fendor commented Nov 24, 2021

The test that fails is interesting. It basically implicitly tests the implicit session setup.
Do we also have explicit tests that test the implicit session setup?

@Avi-D-coder
Copy link
Collaborator Author

Avi-D-coder commented Nov 24, 2021

The test that fails is interesting. It basically implicitly tests the implicit session setup. Do we also have explicitly tests that test the implicit session setup?

I'm not aware of any.

@jneira
Copy link
Member

jneira commented Nov 29, 2021

Thanks for the work doing here
The consecutive hackage releases of implicit-hie has leaked out in nix builds (and maybe in some hackage ones)
I would consider to make changes in implicit-hie using pr's with some code review and testing hls against the desired version (maybe in this repo) using source-repository-package.

@Avi-D-coder
Copy link
Collaborator Author

#2398 (comment)
Work on this PR will continue on implicit-hie-cradle-0.4.*, when this PR is finished I will publish 0.4 as 0.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: unfinished Status for PRs that have been semi-abandoned

5 participants