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

cabal repl --allow-newer #1835

Closed
UnkindPartition opened this issue May 1, 2014 · 7 comments
Closed

cabal repl --allow-newer #1835

UnkindPartition opened this issue May 1, 2014 · 7 comments

Comments

@UnkindPartition
Copy link
Contributor

% cabal repl
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
cabal: Could not resolve dependencies:
...

cabal repl doesn't understand --allow-newer, so I had to run cabal configure --allow-newer, then cabal repl.

@tibbe
Copy link
Member

tibbe commented May 1, 2014

This is a wider issue. For example, test implies build, which implies configure, but you cannot pass configure flags, such as -w, to test. We should make a decision for how we want to handle this for all commands. I'm leaning towards having all configure flags be allowed on commands that call configure. If we go this route we probably have to improve --help to group the flags into sections.

@UnkindPartition
Copy link
Contributor Author

I agree that this is a wider issue — and maybe even wider than that.

Basically, with these recent changes to cabal build/test/etc it's become very hard to understand in advance whether a given cabal command:

  • will (re-)configure
  • will install dependencies
  • will apply any extra options on the command line only to this package, or all its dependencies, too

let alone to control that!

I'd love to see this problem addressed in a consistent way across different commands.

@tibbe
Copy link
Member

tibbe commented May 1, 2014

I agree. My end goal is that people should never have to run configure nor install dependencies manually, which means all commands that need to imply configure will imply configure (and configure will mostly be an implementation detail). Similarly for installing dependencies. The latter will unfortunately have to be limited to sandboxes for now, as it's too dangerous to automatically install packages in the user/global package DB.

@UnkindPartition
Copy link
Contributor Author

A similar issue: cabal install --enable-tests doesn't accept --show-details=streaming.

@sjakobi
Copy link
Member

sjakobi commented Feb 27, 2021

I'd love to see proper support for --allow-newer in cabal repl. Right now it behaves very confusingly, and doesn't attempt to load the --build-depends:

$ cabal repl -b hedgehog --allow-newer=hedgehog:template-haskell
Resolving dependencies...
Build profile: -w ghc-9.0.1 -O1
In order, the following will be built (use -v for more details):
 - fake-package-0 (lib) (first run)
Configuring library for fake-package-0..
Preprocessing library for fake-package-0..
Warning: No exposed modules
GHCi, version 9.0.1: https://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /tmp/cabal-repl.-325769/setcwd.ghci
ghci> 

@fgaz
Copy link
Member

fgaz commented Apr 9, 2021

Just stumbled on this.. I'd say it's also a bug since it prevents --build-depends from working

@fgaz fgaz added the type: bug label Apr 9, 2021
@fgaz fgaz removed this from the milestone Apr 9, 2021
@ulysses4ever
Copy link
Collaborator

Closed with

Please, reopen if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants