-
Notifications
You must be signed in to change notification settings - Fork 841
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
stack repl
doesn't work on project with mixins
#5077
Comments
stack repl
doesn't work with project with mixins
stack repl
doesn't work on project with mixins
I have the same problem. |
Hi! I have the exact same problem with this project. @snoyberg do you have any idea what it could be? |
Same problem for me. |
I have the same issue. It's a blocker for me using stack on my projects. |
I had to change my cleaner mixins stanza for |
I have a bit of time to spend on this issue. Unfortunately I'm neither very familiar with mixins nor with the relevant code in So far I've created a fairly minimal reproducer for this issue: https://github.com/sjakobi/stack-repl-mixin#readme What I understand from looking at the way For a package that has
, the invocation looks like this:
Notably, the list of On the In Line 196 in 9621945
So the next step for me would be to figure out how to get the @snoyberg, @qrilka, does this sound like a reasonable plan of attack? Do you have any advice or pointers for me? @ezyang, do you have any comments or advice? Does my idea to naively enhance My work is on this branch: master...sjakobi:sjakobi/5077-repl-mixins |
I don’t have much to add, but that overall seems like a reasonable approach. |
I need to check if BuildInfo is after Backpack has done mixin linking or not. Naively my expectation is that it will be "easy" to add support for use of mixins that is internal to a library only, and "hard" to add it for mixins that refer to external libraries. |
I'd like to continue working on this issue soon.
@ezyang Do you have a pointer for how I could figure this out myself? I guess https://www.microsoft.com/en-us/research/wp-content/uploads/2016/07/backpack-2016.pdf would be good background reading?! |
@sjakobi OK, I checked, BuildInfo is before mixin linking has happened (it's parsed directly from the Cabal file). However, if there isn't any Backpack involved, then this suggestion:
Will give you an incorrect but still useful version that will do the right thing for people who aren't actually using Backpack signatures. At least for the original reporter of this bug, their problem will be solved. If you're interested in full on Backpack, I'd actually probably recommend my thesis for background reading https://github.com/ezyang/thesis/releases |
Bump. Still an issue. Apart from @sjakobi you've apparently gotten a green light to fix this, any success or further findings? I've checked your branch, but there isn't much there. |
Hello - today I tried to use mixins with stack repl and it didn't work so it appears that this is still an open issue (after almost half a decade!). @sjakobi any chance this will be fixed in the near future? |
General summary/comments (optional)
I have a project that follows the
mixins
approach of using an alternative prelude. When trying to load the project in GHCi viastack repl
, I see multiple defintions not in scope errors. I tried to create a minimal example, but I couldn't.stack
works on my small examples even with common stanzas, multiple stanzas, but for some reasons doesn't work on the following packages (however, the build is successful):Steps to reproduce
git clone git@github.com:kowainik/summoner.git
cd summoner
stack repl summoner
Expected
Successfully entering REPL without compilation errors.
Actual
What actually happened.
If you suspect that a stack command misbehaved, please include the output of that command in
--verbose
mode.If the output is larger than a page please paste the output in a Gist.
Stack version
Method of installation
The text was updated successfully, but these errors were encountered: