Skip to content

Ambiguous TargetSelector crash #6874

Closed
@lukel97

Description

@lukel97

Describe the bug
In the project haskell-language-server, calling cabal repl exe/Arguments.hs from the root directory will give this error:

$ cabal repl exe/Arguments.hs 
TargetSelector: internal error: NoMatch
CallStack (from HasCallStack):
  error, called at ./Distribution/Client/TargetSelector.hs:669:3 in main:Distribution.Client.TargetSelector

This is because a subproject ghcide which is included in the packages field of cabal.project also has a module in a folder ghcide/exe/Arguments.hs.
This doesn't happen when calling cabal repl exe/Arguments.hs from inside ghcide.

Steps to reproduce
Working on getting a minimal test case

Expected behavior
Presumably in this scenario, cabal repl src/Arguments.hs should resolve to the src/Arguments.hs in the root project.

System information

  • cabal HEAD

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions