-
Notifications
You must be signed in to change notification settings - Fork 27
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
Split off the BuildPlan code into its own package #95
Comments
There are two things I'd like to tweak about that script. First, it would be nice to be able to set an arbitrary mirror for the packages. Second, I would like to modify the output script so that the building phases are abstract. What I mean is, instead of invoking programs directly,
the script would just invoke some shell functions
that would be defined in a wrapper. The build plan script wouldn't be executable itself, rather we would have wrappers that source the build plan after defining those functions, i.e.
This way, we can write wrappers that do things like pre-fetch all the packages (but build nothing) or do lots of setup work, without needing to modify the script generator. This also lets us fall back from |
Point (1) makes perfect sense, completely agree. On (2): I'm guessing in that approach, there'd be a config option as to whether the |
I think configuration options to control which tools are used is orthogonal to what I intend by having those functions. Certainly, I appreciate the benefit of having standalone scripts, but for distributing Cabal, it would be more useful to call the generated script from our existing bootstrap script. The reason I say that is orthogonal is that the non-standalone script allows deferring the configuration decision (i.e. what tools to use) until runtime, instead of requiring configuration when the script is generated. |
@ttuegel I've split off the code into the following repo: https://github.com/fpco/stackage-build-plan I believe it supports your requests correctly. Below is an example session. The code base should be easy to tweak if you'd like it to do something slightly different. Can you give it a shot and, if you're happy with it, I'll release to Hackage.
|
Also, you should have write access to that repo now (you'll have to accept the invitation to the fpco organization). |
Actually, let's discuss future modifications in the stackage-build-plan repo itself, closing this issue. |
By popular request. This issue is to figure out the functionality the code should have. For reference, this is referring to the code at:
https://github.com/fpco/stackage-server/blob/master/Handler/BuildPlan.hs
The results can be viewed online at, e.g.:
https://www.stackage.org/lts/build-plan?package=http-client&_accept=application/x-sh
The text was updated successfully, but these errors were encountered: