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
Fix #3345 by having Install manually register packages #3356
Conversation
3e90741
to
e5e96e0
Compare
cabal sandbox init | ||
cabal sandbox add-source custom | ||
cabal sandbox add-source client | ||
# Set HOME to something goofy so that we force the user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you just use --package-db=clear --package-db=global
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that does not work, because these settings don't apply to Setup.hs
build.
$ ghc-pkg-7.6 list
/opt/ghc/7.6.3/lib/ghc-7.6.3/package.conf.d
Cabal-1.16.0
/home/ezyang/.ghc/x86_64-linux-7.6.3/package.conf.d
Cabal-1.22.3.0
Cabal-1.23.0.0
Cabal-1.23.1.0
Cabal-1.23.2.0
$ cabal configure -v --package-db=clear --package-db=global -w ghc-7.6
...
/srv/prod/bin/ghc-7.6 --make -odir ./dist/setup -hidir ./dist/setup -i -i. -package-id Cabal-1.22.3.0-9afd7fdd87eadc07ff9f73c86e22d4fe ./dist/setup/setup.hs -o ./dist/setup/setup -threaded
I'll add a comment to this effect.
/cc @dcoutts |
Having cabal call setup to get the package reg info and then doing the registration ourselves is in principle the right thing to do (and what the new-build code does). I've not looked at the code in detail, but it's the right strategy. @23Skidoo so if you're happy with the code details then go for it. |
Yes, LGTM. @ezyang, feel free to merge the last commit. |
We can't merge this without also merging #3355 (otherwise the patch needs to be substantially reworked.) |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…cated. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Unfortunately, it was too difficult to factor out the common code between ProjectBuilding and Install. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Just the last commit.