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

The --repl-no-load option is not recognized for build-type: Custom #8379

Open
enobayram opened this issue Aug 15, 2022 · 3 comments
Open

The --repl-no-load option is not recognized for build-type: Custom #8379

enobayram opened this issue Aug 15, 2022 · 3 comments

Comments

@enobayram
Copy link

enobayram commented Aug 15, 2022

Describe the bug
I'm not able to start cabal repl with the --repl-no-load in Haskell packages specified to have build-type: Custom.

To Reproduce
Steps to reproduce the behavior:

I've prepared a GitHub repository to demonstrate this issue. So check out: https://github.com/enobayram/cabal-repl-no-load-test

Then in that folder, the following fails, even though a simple cabal v2-repl works.

$ cabal v2-repl --repl-no-load -v
...
creating
/***/cabal-no-load-test/dist-newstyle/build/x86_64-linux/ghc-8.10.7/cabal-no-load-test-0.1.0.0/setup
/***/.ghcup/bin/ghc --make -fbuilding-cabal-package -odir /***/cabal-no-load-test/dist-newstyle/build/x86_64-linux/ghc-8.10.7/cabal-no-load-test-0.1.0.0/setup -hidir /***/cabal-no-load-test/dist-newstyle/build/x86_64-linux/ghc-8.10.7/cabal-no-load-test-0.1.0.0/setup -i -i/***/cabal-no-load-test/. -optP-include -optP/***/cabal-no-load-test/dist-newstyle/build/x86_64-linux/ghc-8.10.7/cabal-no-load-test-0.1.0.0/setup/setup_macros.h -hide-all-packages -no-user-package-db -package-db /***/store/ghc-8.10.7/package.db -package-db /***/cabal-no-load-test/dist-newstyle/packagedb/ghc-8.10.7 -package-id Cabal-3.2.1.0 -package-id base-4.14.3.0 /***/cabal-no-load-test/dist-newstyle/build/x86_64-linux/ghc-8.10.7/cabal-no-load-test-0.1.0.0/setup/setup.hs -o /***/cabal-no-load-test/dist-newstyle/build/x86_64-linux/ghc-8.10.7/cabal-no-load-test-0.1.0.0/setup/setup -threaded
/***/cabal-no-load-test/dist-newstyle/build/x86_64-linux/ghc-8.10.7/cabal-no-load-test-0.1.0.0/setup/setup
repl --verbose=2
--builddir=/***/cabal-no-load-test/dist-newstyle/build/x86_64-linux/ghc-8.10.7/cabal-no-load-test-0.1.0.0
--repl-no-load exe:cabal-no-load-test
unrecognized 'repl' option `--repl-no-load'
CallStack (from HasCallStack):
  withMetadata, called at src/Distribution/Simple/Utils.hs:370:14 in Cabal-3.8.1.0-inplace:Distribution.Simple.Utils
Error: cabal: repl failed for cabal-no-load-test-0.1.0.0-inplace.

Expected behavior
cabal v2-repl --repl-no-load should drop me down to a GHCi session that has no modules loaded.

System information

  • Ubuntu 22.04
  • cabal --version: 3.8.1.0
  • ghc --version: 8.10.7

Additional context
Note that cabal v2-repl --repl-no-load works, if you change build-type to Simple in cabal-no-load-test.cabal

@ulysses4ever
Copy link
Collaborator

Hey @enobayram ! I’m really sorry it took so long to get back to you!

Thanks a lot for bundling up a reproducer, that will help a lot.

I believe currently, there’s very little energy for working on anything build-type: Custom-related. Some consider it a miss feature that eventually should be deprecated and removed. So, I hate to say this, but I’m not sure how much support you’ll get here. If you can look closer into -v3 output and try to figure what’s going wrong proactively and ask questions, chances are you’d get some feedback.

@enobayram
Copy link
Author

@ulysses4ever Thanks a lot for the response! Your input about build-type: Custom is valuable for me, leading me to believe that we should seek the solution in moving away from it.

@ulysses4ever
Copy link
Collaborator

@enobayram yes, avoiding it, if possible, is the preferred way to go forward.

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

2 participants