-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"not in scope" errors when running with GHC 9 + stack test; redux #327
Comments
@sol I'm having the same issue, do you have any ideas what could be the root cause and if there's any workaround? Thanks a lot! |
@echatav do you think it's possible to reproduce your issue to the point where it does not require a database? |
@vaclavsvejcar I think your issue is due to |
@vaclavsvejcar as a workaround, I think you can't set |
@sol Thanks a lot for hints. In my case, that was the issue. It still didn't work with GHC |
Here is the doctest failure in Squeal's CI for GHC 9.0 |
@vaclavsvejcar you are welcome. Ideally, we would enable |
@echatav I don't have any spare cycles to investigate this myself right now. If you (or somebody else) can provide a somewhat more minimal example that reproduces the issue then I'll try to look at it. |
@sol I've made a minimal example branch which demonstrates the test error. |
Relude heavily uses The current workaround is to use GHC 8.10.7 on builds using |
@chshersh hey👋 I'll try to look at it and see if I can help, but it may take a week or so until I get to it. If it gets lost somehow then please feel free to ping me again. |
Problem: universum-doctest passes with GHC < 9, but starts to fail with >= 9. The errors are weird, it complains that a lot of stuff is not in scope. Example: > Not in scope: type constructor or class ‘Text’ Solution: there is the following issue sol/doctest#327. Apparently, something is wrong in `doctest` itself. The maintainer intends to investigate it, so let's wait for that. While waiting, let's disable `universum-doctest` whenever GHC is >= 9.0.0.
Problem: universum-doctest passes with GHC < 9, but starts to fail with >= 9. The errors are weird, it complains that a lot of stuff is not in scope. Example: > Not in scope: type constructor or class ‘Text’ Solution: there is the following issue sol/doctest#327. Apparently, something is wrong in `doctest` itself. The maintainer intends to investigate it, so let's wait for that. While waiting, let's disable `universum-doctest` whenever GHC is >= 9.0.0.
@chshersh in general, if you can provide exact steps on how to reproduce, this will save me a lot of time. Here is what I tried:
diff --git a/relude.cabal b/relude.cabal
index 55e085f..187e237 100644
--- a/relude.cabal
+++ b/relude.cabal
@@ -258,7 +258,7 @@ test-suite relude-doctest
main-is: Doctest.hs
build-depends: relude
- , doctest < 0.19
+ , doctest >= 0.20
, Glob
ghc-options: -threaded
diff --git a/stack.yaml b/stack.yaml
index fd834e1..db2f745 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -1 +1 @@
-resolver: lts-17.5
+resolver: nightly-2022-04-24
|
I am way out of touch with this/these issues, but just FYI: the failures originally reported in July with hledger tests and GHC 9.0 are still happening today, but they don't happen with GHC 9.2. |
sol/doctest#301 / sol/doctest#327 seem to be specific to GHC 9.0.
sol/doctest#301 / sol/doctest#327 seem to be specific to GHC 9.0.
sol/doctest#301 / sol/doctest#327 seem to be specific to GHC 9.0.
I also get this error but it seems related to the I made a simple repository to reproduce the issue: https://github.com/antoine-fl/doctest-bug Using GHC 9:
Using GHC 8:
The relevant doctest is in that file: https://github.com/antoine-fl/doctest-bug/blob/main/src/Lib.hs With GHC 9, using Edit: testing with GHC 9.2, the tests pass again. |
The same is happening to me with |
Adding some examples to this issue, hoping they will be helpful for investigating further: Package
|
I had some luck with getting rid of "not in scope" errors by replacing
(on GHC 9.4.4). |
We were also waiting on support in haskell-ci here. In nixpkgs this has been working for a long time. I don't know what the situation is with 9.6.1 at the moment, but I expect some dependencies do not work yet. doctest is disable for >= 9.4. It breaks in a way similar to sol/doctest#327, but I haven't been able to find a workaround.
See sol/doctest#327 (comment) for discussion on this issue.
did you try |
Strangely I get this error when running locally on |
Here are steps to reproduce the error
Here are the first two reported test failures:
The doctest lives in
squeal-postgresql/test/Doc.hs
and is very simple:The text was updated successfully, but these errors were encountered: