-
Notifications
You must be signed in to change notification settings - Fork 42
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
can't find modules after switch from v0.9.0.4 to v0.9.0.5 #142
Comments
I confirm that I can reproduce this locally. The only two changes which happened in 0.9.0.5 are to add support for ghc-9.2.1 and to refactor the code to make this support easier to add. Perhaps that refactoring accidentally broke something? In any case, the first step is to write a test case so that this regression doesn't occur again! |
Pinging @brandon-leapyear, who authored the refactoring. Any idea how that refactoring could possibly affect which package databases the ghc library can see? |
✨ _**This is an old work account. Please reference @brandonchinn178 for all future communication**_ ✨
<!-- updated by mention_personal_account_in_comments.py -->
…---
The immediate thing that sticks out to me is I'm not sure why I put the
modifyLogger call at the top instead of right before the `setDynFlags df2`
line. If you move the modifyLogger line down, does that change anything?
On Sat, Mar 5, 2022, 7:30 PM Samuel Gélineau ***@***.***> wrote:
git bisect blames a73aceb
<a73aceb>,
which is indeed a refactoring which shouldn't have changed anything;
especially since it only affects logging!
Pinging @brandon-leapyear <https://github.com/brandon-leapyear>, who
authored the refactoring. Any idea how that refactoring could possibly
affect which package databases the ghc library can see?
—
Reply to this email directly, view it on GitHub
<#142 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGUC75LM24UZAJQCL2W76ULU6QRGVANCNFSM5O7O3R2Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
That fixes it, thanks! |
I have a hypothesis as to how configuring a logger can possibly have an effect on package databases. Here's the relevant code:
I'm using ghc-8.4.4, and so
Observe that |
'unsafeRunInterpreterWithArgs' is often used to specify the path to a non-default package database, using the @-package-db@ flag. Unfortunately, a previous refactoring accidentally broke this workflow. The refactoring seems innocent on the surface, so it's worth explaining how that refactoring managed to break anything. The refactoring defined a 'modifyLogger' shim corresponding to the ghc-9.2 function of the same name. In older versions of ghc, 'modifyLogger' is implemented using 'setSessionDynFlags'. As a result, it now matters whether the logger is configured before other calls to 'setSessionDynFlags'. In particular, the logger was configured too early, before the @-package-db@ flags were given to ghc using a second call to 'setSessionDynFlags'. As a result, the first call to 'setSessionDynFlags', the one hidden inside 'modifyLogger', was reading the default package databases and setting internal flag indicating that the package databases have been read. Then, the second call to 'setSessionDynFlags' which specifies non-default package databases with @-package-db@ flags, saw this internal flag and decided not to read the package databases a second time. fixes #142
Now fixed in HEAD; the next step is to release a new version on hackage. And maybe to deprecate the version which has the bug? |
0.9.0.6 is now published, and 0.9.0.5 is now deprecated. Thank you both! |
Hey,
I made some changes to my gui project for tidal recently and decided to publish a new release. I didn't change anything relating to hint, so I thought that the workflow I had should be still fine. I also decicded to use the newest version of hint (previously I used 0.9.0.4).
But I noticed that in the new release hint wasn't able to find any of the haskell modules. This makes me think something changed in the way the interpreter is called with arguments? The arguments I use with my interpreter are:
where
lib
is dependent on the location of the binary file. This works fine with hint 0.9.0.4, but is apprently broken with the latest version.The text was updated successfully, but these errors were encountered: