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

Bug: cabal repl file fails for executable component #6622

Closed
fendor opened this issue Mar 29, 2020 · 7 comments
Closed

Bug: cabal repl file fails for executable component #6622

fendor opened this issue Mar 29, 2020 · 7 comments
Assignees
Milestone

Comments

@fendor
Copy link
Collaborator

fendor commented Mar 29, 2020

To Reproduce
Steps to reproduce the behavior:
Set up an example project:

$  cabal init -p example --libandexe --tests --main-is=Main.hs --source-dir=src --application-dir=app --test-dir=test

Load library component:

$ cabal repl src/MyLib.hs
# Succeeds to load
$ cabal repl src/Lib.hs
# Fails to load as expected 
$ cabal repl app/Main.hs
# Fails to load although
cabal.exe: Unknown target './app/Main.hs'.
The package example has no file target 'app/Main.hs'.
$ cabal repl test/MyTestLib.hs
cabal.exe: Unknown target './test/MyLibTest.hs'.
The package example has no file target 'test/MyLibTest.hs'.

Expected behavior

The file targets app/Main.hs and test/MyTestLib.hs should successfully load.

System information

  • cabal: 3.0.0.0, but also HEAD.

Benefit

Directly benefits hie-bios which uses cabal repl <filename> to find compilation flags.
cc @mpickering

@fendor fendor self-assigned this Mar 29, 2020
@fendor
Copy link
Collaborator Author

fendor commented Mar 29, 2020

I have the bug fix almost ready. It is a bug in the target resolvement.

@mouse07410
Copy link
Collaborator

Naive question: when can one hope to see this PR merged, and what Cabal release will it end up in?

@fendor
Copy link
Collaborator Author

fendor commented Apr 12, 2020

Hopefully next week, and Ill assume cabal 3.4?

@mouse07410
Copy link
Collaborator

mouse07410 commented Apr 12, 2020

Hackage now serves Cabal 3.2.0.0.

Do you have an idea of the release rhythm? I.e., how long would it normally take to release 3.4? Several months? Weeks? Years?

And fixes are rarely/never backported?

@phadej
Copy link
Collaborator

phadej commented Apr 12, 2020

@mouse07410 there is no rhythm. So far Cabal releases were tied to GHC releases, but I don't know what are the plans for GHC-8.12, they are not on GHC status page: https://gitlab.haskell.org/ghc/ghc/-/wikis/status

EDIT: note how 8.10 schedule were delayed, so I'd interpret the future dates as "the earliest possible".

@mouse07410
Copy link
Collaborator

@phadej thanks for explaining.

You probably know if "maintenance releases" happen? I.e., is there a chance that this PR (and possibly other fixes) would be released before Cabal 3.4 is ready?

@fendor
Copy link
Collaborator Author

fendor commented May 20, 2020

Fixed by #6826

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

Successfully merging a pull request may close this issue.

3 participants