-
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
Internal library component not available for REPL #4564
Comments
@mihaimaruseac Would you take a look, please? |
@rikvdkleij Thanks for the report. Would you please indicate which platform you are on, paste the output of |
Platform is macOS. stack --version What do you mean with the details tags? I can can run the command with the |
See also #4148, unfortunately until March I don't really have time to look into this due to personal reasons. Hopefully after March I can get back to making internal libraries work as they should everywhere in Stack. @rikvdkleij, you can copy the output of
and
(just make sure you remove the spaces between the ` characters). The output would look like ```
This is something from the output.
Another line of the output.
And yet another one.
And so on
and on
and on
...
```
|
@mihaimaruseac Thanks for your reply! Great that you will solve this issue! Currently this is a blocker to use internal libraries. Also for IDE support. Verbose log in which did some renaming:
|
@mihaimaruseac Later on I added spaces between the |
I tried to get the formatting fixed but failed. It's ok though, the log is readable. Thank you for it |
You need a blank line between the html tags and the backticks 👍. |
@dbaynard Thanks! |
Do the other commands work, e.g. build? |
Yes, |
And to be clear, this is different to #4148 (i.e. it still doesn't work after running |
Yes, that's right. Even after a build it does not work. Also when I do |
I think #4148 is no longer valid, the last comment there says that ghci after build no longer works (so probably we had a regression there, though since internal libraries support needs to be redone I don't think we should bother bisecting and reverting)
Can you open another issue for that, please? And assign to me too, I'll take care of it too next month (or earlier if I get time) |
Isn't this the same issue only it appears differently? |
I also am facing this issue. Is there any workaround that could be used while the issue is not fixed? See my details below: OS - Ubuntu 18.04, stack --version: Even after |
This issue affects me a lot, as my readers are not able to use |
It may not be the same problem, but also in my environment launching The same error occurred when used stack version 1.9.3 and 2.1.1. The error is below.
I do not know how it works, but with the option of |
The error message I got was almost the same as yours @tkaaad97. The |
Hi, I have this issue:
I also have the letter "z" appended.
GHCi complains that there is two |
BTW I think this is a duplicate of #2790 |
So after playing around with some minimal (non) working examples I have established the following two things about both When running
b) Further to this however, if the I attach zipped project which can (hopefully) be used to reproduce this. I assume this is a bug in stack and that a root The good news is that in the short term an easy fix to b) is to simply add a root library component with an empty module. |
I had another look into this and it appears that it's another example of a problem appearing because we don't have yet component-based builds (i.e. #4745) implemented. Currently Stack only has some special handling for "ordinary" components, i.e. executables, benchmarks and tests and internal libraries are handled as an extra step of building a package library. And as I've said in #5342 I don't think I myself can find enough time to implement that ticket. |
Any updates on this? It would be a great feature to have. |
It seems last stack version does not have a fix for this. Let me know if we can help in some way to make progress. |
I'm making slow but steady progresses, I havn't looked at the GHCi related stuff yet. I have a component based builds branch (comp/package-refactoring) but it doesn't pass all the tests yet. |
We got another issue about this in hls. I am afraid users are avoiding internal libraries to get projects work in the ide. |
We've had to just rip out a number of internal libraries in order to be able to get haskell-language-server to work. Took us a longwhile to understand why the production builds were working but a developer couldn't get anywhere locally with their IDE. I'm not hugely fussed about "internal libraries" so we're getting rid of them, but it was a head scratcher, that's for sure. |
This worked fine when working on the executables, but not on the lib itself (which was not listed in `stack ide targets` or the target supported in `stack build advent-of-code-y2021:lib:advent-of-code-inputs`). An issue is still open at the moment: commercialhaskell/stack#4564
Any updates on this? |
Seeking to consolidate open issues, I am going to close this issue: in respect of |
Cabal 2 support internal libraries and as I understand Stack version 1.9.3 also.
I expect that that
stack ide targets
gives all components but the internal libraries are not mentioned.Also
stack repl [name of lib]
does not work.Steps to reproduce
Create cabal file
packagename.cabal
which contains components:library
library libname
Expected
To work:
stack repl packagename:lib:libname
REPL is started.
Actual
What actually happened.
Error parsing targets: Directory not found: packagename:lib:libname
Also when I start a REPL with a component which depends on the internal library, the internal modules can not be loaded.
Stack version
1.9.3
The text was updated successfully, but these errors were encountered: