Comments (11)
Patch here: #9720
from cabal.
@ulysses4ever Here's a standalone reproducer:
Checkout https://github.com/TeofilC/cabal-repl-repro
Then
cabal build foo
cabal repl foo
I think the key detail is having a custom setup somewhere in the project. It seems to be necessary to build first too.
I'm building with GHC 9.4.8.
Adding the following to cabal.project:
allow-newer:
*:Cabal,
*:Cabal-syntax
source-repository-package
type: git
location: https://github.com/haskell/cabal.git
subdir: Cabal Cabal-syntax
Makes the issue go away. So it seems like it's an issue with mixing a new cabal with an old Cabal lib?
from cabal.
I can't reproduce it. What timestamp do you have on that binary? (We really should start embedding commit SHA into the --version
info.) Also, what is foo
, any chance for a self-contained reproducer?
from cabal.
I ran this command a couple of hours ago: ghcup install cabal --force -u https://github.com/haskell/cabal/releases/download/cabal-head/cabal-head-Linux-x86_64.tar.gz head
. The ls timestamp is Feb 14 10:20
from cabal.
foo
is an arbitrary component in our project. Perhaps there's something peculiar to this project that is triggering it. FWIW cabal build
seems to work fine.
I'll extract a reproducer at some point this afternoon.
I was using the latest Linux-static build.
from cabal.
/home/username/.ghcup/bin/cabal-head repl aeson
seems to clone a bunch of neccessary stuff and then just exits as described.
from cabal.
running /home/username/.ghcup/bin/cabal-head repl
in a non-package environement (just ~
) lets me enter the repl:
$ /home/username/.ghcup/bin/cabal-head repl
Warning: this is a debug build of cabal-install with assertions enabled.
Warning: Parsing the index cache failed (Data.Binary.Get.runGet at position
16: Non-matching structured hashes: f46da61e7afa58a5e8fd1d2b6fb79899;
expected: d81bdd513f41b5d7ee4cd28455adadbe). Trying to regenerate the index
cache...
Resolving dependencies...
Build profile: -w ghc-9.4.7 -O1
In order, the following will be built (use -v for more details):
- fake-package-0 (interactive) (lib) (first run)
Warning: this is a debug build of cabal-install with assertions enabled.
Configuring library for fake-package-0...
Warning: this is a debug build of cabal-install with assertions enabled.
Warning: No exposed modules
GHCi, version 9.4.7: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /tmp/cabal-repl.-239669/setcwd.ghci
ghci> :i head
head :: GHC.Stack.Types.HasCallStack => [a] -> a
-- Defined in ‘GHC.List’
ghci>
from cabal.
I am looking into this.
from cabal.
With 9.6.2
I get:
/home/matt/cabal-bisect/dist-newstyle/build/x86_64-linux/ghc-9.6.2/cabal-install-3.11.0.0/x/cabal/build/cabal/cabal repl foo
with 9.4.8 I get
[matt@nixos:~/cabal-bisect/cabal-repl-repro]$ /home/matt/cabal-bisect/dist-newstyle/build/x86_64-linux/ghc-9.6.2/cabal-install-3.11.0.0/x/cabal/build/cabal/cabal repl foo
Warning: this is a debug build of cabal-install with assertions enabled.
Resolving dependencies...
from cabal.
Seems that this was broken by the multi-repl patch.
from cabal.
Thanks for fixing this so quickly @mpickering !
from cabal.
Related Issues (20)
- Support `build-depends:` injection from `cabal.project` HOT 1
- Don't show the "Unknown/unsupported 'ghc' version detected" warning at default verbosity HOT 2
- Support GHC2024
- Question about: `store-dir`, `package-dbs`, and simulate sandbox HOT 4
- testsuite: skipifVersion "9.6.3" in VersionPriority tests looks overfitted HOT 6
- Bundle Cabal and Cabal-syntax source with cabal-install? HOT 8
- Regression on master: `main-is` not picked up from conditional HOT 1
- No recompilation when using `addDependentFile` or `-fforce-recomp` in a build dependent package (stanza) HOT 2
- `cabal clean` should fail if not in a cabal directory
- Deprecate <target>-specific flags in favour of flags that will be applied to each component built. HOT 1
- --enable-executable-profiling seems non-functional HOT 1
- cabal gen-bounds ignores project file HOT 6
- build-info make recipe leaking information about `HEAD`
- `cabal path foo` errors with ` 'man' doesn't take any extra arguments: foo` HOT 3
- Regression in 3.10 `cabal build`: the `extra-prog-path` ends up first in the PATH, shadowing `build-tools` HOT 5
- Leading blank spaces are confusing HOT 1
- Issue/PR relationship in cabal development are missing
- `haddock-project`, missing `--local` option
- cabal-install inconsistently looks through symlinks HOT 4
- cabal install: "exit code 11"? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cabal.