-
Notifications
You must be signed in to change notification settings - Fork 107
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
ob run: Query local packages from Nix project #489
Conversation
Thanks, bit busy for the next few days, but I will fix the typo noted. Also I realised that the extra local packages must be added to |
Thanks for the reviews. I have fixed everything and rebased. |
I'm suspicious of these changes for a reason I've forgotten. Need to go back and remember.... |
Oh now I remember. Pulling in all of the packages in |
I've talked about this sort of thing before with @ryantrinkle, who suggested having only unpacked thunks from |
I think there's also some progress on adding actual multi package support to GHCI. |
Even restricting to unpacked thunks seems too onerous IMO. The problem will surface for a package regardless of how it's retrieved so you will always want to be able to specify which packages get this extra treatment. |
The way I see it, the point of having a thunk be unpacked is editing it, in which case you'd want it thrown in more often than not. |
Yes the point is editing, but you definitely need a way to make it not get loaded into GHCi or unpacking might break ob run... |
I might like see a 3-way "definitely build", "definitely ghci", and "do automatically based in unpackedness" |
Regarding "one set of extensions" and such: what if we inject a preprocessor ( |
That's a very interesting idea. |
We're going to try this out via preprocessor and discriminating on packedness of dependencies. |
The reason that I made this PR is that, in addition to the standard 3 local packages ( |
@rvl A lot of people have been rooting for this PR. We really appreciate your work! Sorry it's taken so long to get attention. You're right that on average the cabal settings for multiple packages will probably work well together. The difficulty has been: "How do we get this to a point where we can confidently release it to everyone by default?" I think the preprocessor idea finally unlocks that piece of the puzzle because we can actually load each module the way it was meant to be loaded. Do you foresee issues with this plan? |
The preprocessor idea sounds like more work to implement but the end result will be better for users. It will also help in the case where users have (for example) modified default extensions in |
@3noch It's looking good, thanks! |
… on the obelisk one
@rvl This is now in the |
This enhances the
getLocalPkgs
function so that packages defined in the Nix project get added to the GHCi config.This PR is slightly related to #475. The
readProcessJSONAndLogStderr
function could also be used there.