You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a (perhaps unusual) configuration with two test suits in the cabal file. The project compiles and runs ok.
Running the two tests (each in a separate test suite) runs with cabal test test1 and cabal test test2 ok.
When I run cabal repl test1 I get the following:
Build profile: -w ghc-9.4.5 -O1
In order, the following will be built (use -v for more details):
- relocation-0.0.1 (test:test1) (ephemeral targets)
Preprocessing test suite 'test1' for relocation-0.0.1..
GHCi, version 9.4.5: https://www.haskell.org/ghc/ :? for help
<no location info>: error: Can't find src/ClassMain.hs
Failed, no modules loaded.
Loaded GHCi configuration from /home/frank/Workspace11/experiments_SSG_related/relocation/.ghci
[1 of 3] Compiling Main ( tests/Testing.hs, interpreted )
[2 of 3] Compiling Paths_relocation ( /home/frank/Workspace11/experiments_SSG_related/relocation/dist-newstyle/build/x86_64-linux/ghc-9.4.5/relocation-0.0.1/t/test1/build/test1/autogen/Paths_relocation.hs, interpreted )
Ok, two modules loaded.
ghci>
and processing goes as usual.
The error message error: Can't find src/ClassMain.hs troubles me (because I have with a similar configuration a more serious problem with error: relocation overflow: which might be related).
The cabal file is
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.35.3.
--
-- see: https://github.com/sol/hpack
name: relocation
version: 0.0.1
synopsis: a new test
description: test for relocation overflows
license: BSD2
license-file: LICENSE
build-type: Simple
library
exposed-modules:
Lib.Top
other-modules:
Paths_relocation
hs-source-dirs:
src
ghc-options: -Wall
build-depends:
base >=4.7 && <5
default-language: Haskell2010
executable relocation
main-is: newtest.hs
other-modules:
Paths_relocation
hs-source-dirs:
app
ghc-options: -Wall
build-depends:
base >=4.7 && <5
default-language: Haskell2010
test-suite test1
type: exitcode-stdio-1.0
main-is: Testing.hs
other-modules:
Paths_relocation
hs-source-dirs:
tests
ghc-options: -Wall
build-depends:
base >=4.7 && <5
, relocation
default-language: Haskell2010
test-suite test2
type: exitcode-stdio-1.0
main-is: Testing2.hs
other-modules:
Paths_relocation
hs-source-dirs:
tests2
ghc-options: -Wall
build-depends:
base >=4.7 && <5
, relocation
default-language: Haskell2010
cabal, ghc versions
The Glorious Glasgow Haskell Compilation System, version 9.4.5
frank@bhutan:~/Desktop$ cabal --version
cabal-install version 3.8.1.0
compiled using version 3.8.1.0 of the Cabal library
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Thank yo for the hint to look into the .ghci file. I am sorry, I tried to build a minimal example and forgot that I had still an old .ghci file in the directory, which produced the src/ClassMain.hs message. (The relocation error problem vanished as well after some unrelated changes, fortunately). Thank you for your efforts!
Describe the bug
I have a (perhaps unusual) configuration with two test suits in the cabal file. The project compiles and runs ok.
Running the two tests (each in a separate test suite) runs with
cabal test test1
andcabal test test2
ok.When I run
cabal repl test1
I get the following:and processing goes as usual.
The error message
error: Can't find src/ClassMain.hs
troubles me (because I have with a similar configuration a more serious problem witherror: relocation overflow:
which might be related).The cabal file is
To Reproduce
Expected behavior
I expect no error message
cabal run
produces expected result.System information
cabal
,ghc
versionsThe Glorious Glasgow Haskell Compilation System, version 9.4.5
frank@bhutan:~/Desktop$ cabal --version
cabal-install version 3.8.1.0
compiled using version 3.8.1.0 of the Cabal library
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: