-
Notifications
You must be signed in to change notification settings - Fork 717
Open
Labels
cabal-install: cmd/buildre: error-messageConcerning error messages delivered to the userConcerning error messages delivered to the usertype: enhancement
Description
Describe the bug
cabal repl
and cabal build
for unknown module displays confusing error message.
Error: cabal: Failed extracting script block: `{- cabal:` start marker not
found
To Reproduce
$ cabal init -n --lib
# insert the following in the cabal file
$ cat test-cabal-errors
cabal-version: 3.0
name: test-cabal-errors
version: 0.1.0.0
build-type: Simple
library
exposed-modules: MyLib
build-depends: base ^>=4.17.1.0
hs-source-dirs: src
default-language: Haskell2010
$ touch src/Lib.hs
$ cabal repl src/Lib.hs
$ cabal build src/Lib.hs # same error message
Expected behavior
The error message should convey to the user clearly what is going wrong and why.
Ideally, include information on how to solve the issue. (E.g. "add to exposed-module of some specific component.")
System information
cabal
: cabal-install version 3.10.1.0
Additional context
Related to haskell/haskell-language-server#3695 and haskell/haskell-language-server#3595
Tooling has to make sense of this error message to provide any sensible code actions.
ffaf1
Metadata
Metadata
Assignees
Labels
cabal-install: cmd/buildre: error-messageConcerning error messages delivered to the userConcerning error messages delivered to the usertype: enhancement