-
Notifications
You must be signed in to change notification settings - Fork 197
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
Take better advantage of cabal nix-style builds #1182
Comments
I'm probably misunderstanding something, but superficially using cabal.project file should allow picking up a local version of a package without having it be published in any way. |
That sounds approximately right, but I suspect there are some subtleties in getting it to work. I think this works for building the server. I still don't know how one gets from having a cabal.project file to building a GHC environment file that can be passed to GHCJS to build submitted code with GHCJS. I really don't want to have to create a cabal fail every time I build student code (though, with the current setup, I suppose that's not so hard, since student code is built in a temporary directory anyway) |
|
I think there's some confusion here. By "cabal nix-style builds" we just mean |
If I figured out a few issues, I could switch to cabal's nix-style builds, and it would have a few advantages. The basic idea is:
cabal v2-install
write a GHC environment file on build that describes the exact set of build artifacts that implement that environment. Pass this environment file to GHCJS when building client code.The more formal specification of the environment (instead of "whatever packages happen to be installed right now") is its own reward. But I also expect this to make builds much faster and more reproducible. Currently, I have a tendency to sometimes hand-pick only some packages to rebuild, to save time in the development cycle, and
cabal v2-install
should make that obsolete.Challenge:
cabal v2-install
really doesn't seem to like packages just sitting in a subdirectory. It wants them to come from some repository. I'll have to workaround this somehow.The text was updated successfully, but these errors were encountered: