-
Notifications
You must be signed in to change notification settings - Fork 74
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 #301
Comments
It appears not to see the bindings in the current module (the module containing the doctests). More data points:
|
I have maybe narrowed this down to |
Any idea why doctests would fail to see bindings in scope, when invoked with those GHC_ENVIRONMENT settings ? |
Possibly related, "template-haskell" is among the tests failing with GHC 9: #303 |
Same error with |
@simonmichael I'm running into this issue; and I do not use stack at all. Wondering if you had any further insights. |
I have not, sorry.
|
Thanks.. Unfortunately this renders doctest pretty much unusable with the most recent GHC9.2.1 release. It's hard to maintain open-source projects in the presence of a fast moving target like GHC. The doctest project filled a very important hole in the testing story for Haskell, with no alternatives to it that I am aware of. I wonder if we should seek help at GHC head-quarters, or elsewhere to make this issue better known; should this be a GHC issue to start with. |
I don't use doctest much, but I'd like to more, so I'm in favour. Yes, worth asking #ghc and also proposing it in the appropriate Haskell Foundation channel indeed. |
(I suspect it's not a hard problem to fix, just requires deep knowledge of these tools.) |
My bad, I thought you were the maintainer! I see it's @sol Perhaps he has some plans to pursue this further? |
One alternative could be cabal-docspec. |
@ysangkok https://hackage.haskell.org/package/doctest-extract is another attempt, which has the right idea of extracting tests and compiling them on the side for speed; but so far as I know it's not ready for prime time. As far as I can see |
Thanks for the One down-side is it's not on hackage, which makes it a bit of a hassle to get your hands on. But not a big deal; I expect it'll eventually land on hackage. This, of course, takes nothing from doctest as is, and efforts of @sol. It's a great piece of software and I'd love to see it flourish. It's just that there's an alternative that can be utilized in the meantime. Much appreciated. |
@LeventErkok I'm sorry I haven't been involved with maintaining @quasicomputational did a great job and I think @andreasabel tried to keep on the lights for the last year or so. But from what I see we are at the verge of bit rot. However, I'm not sure if I'm ready to let Looking at it right now I think we don't support cabal There are two issues here:
(1) should be easy to work around. Not sure about (2). |
I think this is a GHC upstream bug: https://gitlab.haskell.org/ghc/ghc/-/issues/20670 I also assume that this is fixed on @LeventErkok @simonmichael can you give it a try and report back if there are still any issues left? Basically, what you want to do is:
with a recent version of |
The issues with The issue with I think one way to make it work is to creatively (mis)use |
Thanks @sol. I've since moved to |
Unless given evidence to the contrary, I assume that this is fixed with |
I'm still getting this error with doctest-0.20.0. |
@Xitian9 can you please open a new issue + also give the exact steps to reproduce. This will help a lot. |
@sol I'm getting this error with |
I'm getting this issue as well. Works with GHC 8 but not GHC 9. Same error with doctest 0.18.2 and 0.20.0. Here's a link to what the error looks like. |
@vaclavsvejcar @echatav if you can open a new issue with exact steps on how to reproduce (bonus points, if you can provide a minimal example), that would help a lot. What I assume could happen is that https://gitlab.haskell.org/ghc/ghc/-/issues/20670 is triggered by other conditions besides |
I opened a new issue with reproduction steps and failure details. |
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.
Some tests that have been working with GHC 8.x are giving a lot of name not in scope errors when run with GHC 9.0.
With doctest-0.18.1, other pkgs, GHC 8.10:
With doctest-0.18.1, other pkgs, GHC 9.0:
I didn't find anything relevant in the issue tracker or https://hackage.haskell.org/package/doctest-0.18.1/changelog or GHC release notes. What could explain this ?
The text was updated successfully, but these errors were encountered: