Skip to content
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

Add 'store-dir' global flag for custom store location #4623

Merged
merged 8 commits into from
Aug 9, 2017

Conversation

alexbiehl
Copy link
Member

@alexbiehl alexbiehl commented Jul 24, 2017

This is also a nice workaround for #4515 since I can easily define store-dir=C:\cabal-store in my global configuration.

This also propagates the global logs-dir configuration instead of hard-coding the logs dir to cabalDir </> logs.

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.

@mention-bot
Copy link

@alexbiehl, thanks for your PR! By analyzing the history of the files in this pull request, we identified @dcoutts, @ezyang and @hvr to be potential reviewers.

@23Skidoo
Copy link
Member

Haven't looked at the code, but the general idea is good.

@ezyang
Copy link
Contributor

ezyang commented Jul 24, 2017

LGTM. CI failures are because you've forgotten some test/monoid-y code for the config change. Look at an old diff which added a field to figure out exactly what.

@alexbiehl alexbiehl force-pushed the pr/global-store-flag branch from 60cf06a to 5448f1e Compare July 24, 2017 14:53
@alexbiehl
Copy link
Member Author

OK, this is ready for review now! Tests should work pass now!

@alexbiehl
Copy link
Member Author

Hmm. I am not sure what is causing some of the tests to fail.

@ezyang
Copy link
Contributor

ezyang commented Jul 27, 2017

It doesn't look like it's your fault, looks like CI is in trouble right now.

@ezyang
Copy link
Contributor

ezyang commented Jul 27, 2017

FYI I cancelled your most recent build because it was definitely going to fail

@ezyang
Copy link
Contributor

ezyang commented Jul 29, 2017

CI is unwedged, I restarted it.

@ezyang
Copy link
Contributor

ezyang commented Aug 2, 2017

Hi @alexbiehl, can you rebase your PR on master and repush? It doesn't look like Travis is successfully merging with master (which has fixed contbuild.)

@alexbiehl alexbiehl force-pushed the pr/global-store-flag branch from 573c12f to 0570dda Compare August 2, 2017 05:25
@alexbiehl
Copy link
Member Author

Almost...

@alexbiehl
Copy link
Member Author

Yeah! CI is happy!

@23Skidoo
Copy link
Member

23Skidoo commented Aug 2, 2017

@alexbiehl Can you please add some docs and update the changelog? Otherwise the patch seems okay.

@23Skidoo
Copy link
Member

23Skidoo commented Aug 2, 2017

@alexbiehl NB: you can use [ci skip] anywhere in the commit message body to avoid triggering CI for documentation-only commits.

@hvr
Copy link
Member

hvr commented Aug 9, 2017

@23Skidoo are the changelog conflicts the only thing keeping this from being merged, or was there something else that needs doing?

@ezyang
Copy link
Contributor

ezyang commented Aug 9, 2017

Yes it's just the changelog conflict.

@23Skidoo 23Skidoo merged commit 22d8e32 into haskell:master Aug 9, 2017
@hvr hvr added this to the 2.0 milestone Aug 10, 2017
@hvr hvr added this to the 2.0.1 milestone Aug 10, 2017
@hvr hvr removed this from the 2.0 milestone Aug 10, 2017
@Mistuke
Copy link
Collaborator

Mistuke commented Jan 24, 2018

I've been trying to use this but it always results in a weird path:

$ cabal --store-dir=/e/cabal-store new-test
Build profile: -w ghc-8.0.2 -O1
In order, the following will be built (use -v for more details):
 - base-compat-0.9.3 (lib) (requires build)
....
Configuring library for base-compat-0.9.3..
cabal.exe: ghc-pkg dump failed: dieVerbatim: user error (cabal.exe:
'E:\msys64\mingw64\bin\ghc-pkg.exe' exited with an error:
ghc-pkg.exe: C:cabal-store\ghc-8.0.2\package.db:
getDirectoryContents:findFirstFile: does not exist (The system cannot find the
path specified.)
)

No matter what path I give it, the resulting path seems to always be rooted in C: even though I gave it E: and the path itself is invalid because it's missing the \ after the colon...

@23Skidoo
Copy link
Member

@Mistuke Can you please file a new issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cabal-install: nix-local-build re: store-dir On local nix store (option `--store-dir`)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants